Hello,
I am programming an application in VB.NET that makes use of a custom control (inherited from Windows.Forms.UserControl), which uses its Paint event (or rather MyBase.Paint) to graph mathematical equations that the user can enter. My problem is that, when the user presses the Tab or Alt button on the main form hosting the control that graphs the equations, the form redraws itself and fires the Paint event of the custom control, thereby forcing a redraw of the graphs. Strangely, this only happens the first time each of the buttons is pressed - each subsequent press of the Alt or Tab button does not invoke a redraw.
This wouldn't be such a big problem if the drawing event wouldn't take such a long time - sometimes (depending on what equations the user has entered), the paint event can take about 10 seconds to complete. I would like to avoid this unecessary wait.
I would be thankful for any sort of help and can of course provide more information if needed.
Thanks
Ibby
I am programming an application in VB.NET that makes use of a custom control (inherited from Windows.Forms.UserControl), which uses its Paint event (or rather MyBase.Paint) to graph mathematical equations that the user can enter. My problem is that, when the user presses the Tab or Alt button on the main form hosting the control that graphs the equations, the form redraws itself and fires the Paint event of the custom control, thereby forcing a redraw of the graphs. Strangely, this only happens the first time each of the buttons is pressed - each subsequent press of the Alt or Tab button does not invoke a redraw.
This wouldn't be such a big problem if the drawing event wouldn't take such a long time - sometimes (depending on what equations the user has entered), the paint event can take about 10 seconds to complete. I would like to avoid this unecessary wait.
I would be thankful for any sort of help and can of course provide more information if needed.
Thanks
Ibby