shouzama
Active member
Lets suppose I have a Graphic object attached to a generic PictureBox.
If I draw something on the graphic object during the Form.Load event, nothing is actually displayed.
I know this happens because the "refresh" action on the Form (when it finally shows up) cancels everything that has been drawn on it.
To "sync" up the drawing with the refresh, I thought it was simply a matter of choosing the right event.
So, I put every "draw" into the Form.Paint event.
No results, however.
When the form loads, nothing is displayed
When the form loses and then gains focus, nothing is displayed
However, when the form is brought over the boundaries of the screen (and then back in), the picture draws correctly.
Should I put the "draw" event even in the Form.GotFocus?
Or am I missing something else?
If I draw something on the graphic object during the Form.Load event, nothing is actually displayed.
I know this happens because the "refresh" action on the Form (when it finally shows up) cancels everything that has been drawn on it.
To "sync" up the drawing with the refresh, I thought it was simply a matter of choosing the right event.
So, I put every "draw" into the Form.Paint event.
No results, however.
When the form loads, nothing is displayed
When the form loses and then gains focus, nothing is displayed
However, when the form is brought over the boundaries of the screen (and then back in), the picture draws correctly.
Should I put the "draw" event even in the Form.GotFocus?
Or am I missing something else?