Hi!
I'm working on a project in Visual Studio that i should use round buttons, so i found a round button .dll and i used them.
When i was running the program i understood some parts of my code didn't work so i used some breakpoints and i got that the program works till line 1 and then jumped to designer.cs part
1 GameMatris[0, 3] = 0;
2 GameMatris[0, 4] = 0;
3 GameMatris[0, 5] = 0;
and then jumped to RoundButton.cs part and reading these codes:
protected override void OnPaint(PaintEventArgs e)
{
buttonColor = this.BackColor;
edgeColor1 = ControlPaint.Light(buttonColor);
edgeColor2 = ControlPaint.Dark(buttonColor);
Graphics g = e.Graphics;
g.SmoothingMode = SmoothingMode.AntiAlias;
Rectangle buttonRect = this.ClientRectangle;
edgeWidth = GetEdgeWidth(buttonRect);
FillBackground(g, buttonRect);
if (RecessDepth > 0)
{
DrawRecess(ref g, ref buttonRect);
}
DrawEdges(g, ref buttonRect);
ShrinkShape(ref g, ref buttonRect, edgeWidth);
DrawButton(g, buttonRect);
DrawText(g, buttonRect);
SetClickableRegion();
}
and after a long reading it opens the form without going to line 2 or 3.
More info:
this program got an array (GameMatris) and then change the back colors of round buttons according to the array. but the function of drawing the back colors is some where else and i don't get why here the code jumps!!!
so what is the problem??? and what should i do to solve it???
Thanks and regard.