Click here to Skip to main content
15,897,334 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
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
C#
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:
C#
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.
Posted
Comments
i.fakhari 30-Jan-14 5:16am    
i guess it's a bug and the cause is the round button dll !!!! :-[
i.fakhari 30-Jan-14 5:35am    
you mean the problem is round buttons???
I can not understand why the code jumps in that way!!! It's awful !!!!
i.fakhari 30-Jan-14 5:36am    
actually i used this article .dll for my round buttons :]
[no name] 30-Jan-14 23:57pm    
It's the .dll which is causing the code to jump.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900