T
T!
Hi,
I have the following problem using c#.net.
I created my own button class inherited from Control to be responsible for
drawing my button. In my application I create 20 buttons of my own button,
something like a keyboard.
In my OnPaint event I do someting simple like graphics.fillrectangle.
The problem is that the drawing of the buttons is very slow, for example: if
i create these buttons in a loop I can see them being drawn one at a time.
For comparison reasons I placed a normal button on an empy form and in its
onclick event I use the same loop as for my buttons but instead of creating
buttons I simply make a call to graphics.fillrectangle and all the
rectangles are created in a flash!
Does anybody know if there is anyway to speed up the processing painting
Controls???
thnx in advance
I have the following problem using c#.net.
I created my own button class inherited from Control to be responsible for
drawing my button. In my application I create 20 buttons of my own button,
something like a keyboard.
In my OnPaint event I do someting simple like graphics.fillrectangle.
The problem is that the drawing of the buttons is very slow, for example: if
i create these buttons in a loop I can see them being drawn one at a time.
For comparison reasons I placed a normal button on an empy form and in its
onclick event I use the same loop as for my buttons but instead of creating
buttons I simply make a call to graphics.fillrectangle and all the
rectangles are created in a flash!
Does anybody know if there is anyway to speed up the processing painting
Controls???
thnx in advance