Rob,
Paint event will only be fired when there's the need to paint something.
That is why you must minimize your window in order to see your code work.
Whenever you want a piece of a control / form to be painted, you should call
Invalidate on that control / form. You can optionally pass the area to
invalidate as an argument to Invalidate.
The Paint event won't be fired immediately; it will be fired when your
application has no other events to process. You can force a control to
repaint itself by calling Refresh, but it is better waiting for the system
to do it automatically.
You can optimize your Paint logic if you look at the Clip rectangle passed
to you. It tells you which part of the control needs being repainted.
Hope it helps
> Hi,
>
[quoted text clipped - 23 lines]
>
> }
Rob Brooks - 29 Sep 2005 17:02 GMT
Cool. Thanks for that.
I was able to Invalidate my PictureBox in the Form by passing just a
Rectangle to the Invalidate member function of the PictureBox.
I seemed to be the best version to use use as I was merely plotting a
control point cursor on the picturebox with a mouse click.
Nice and efficient.
Thanks again.
R.
> Rob,
>
[quoted text clipped - 14 lines]
>
> Hope it helps