June 2003
Intermediate to advanced
800 pages
34h 20m
English
You want to draw a combination of elements on a form and track them so that they can be redrawn later.
Place all your drawing code in an event handler for the Form.Paint event. When you need to update the form, call the Form.Invalidate method.
In many applications, drawing takes place in response to another action, such as a user clicking a button or clicking directly on the form surface. Consider the example shown in Figure 12-8, in which the user can draw a small square object anywhere on a form simply by clicking with the mouse.

Figure 12-8. Custom drawing.
In this case, you have two choices:
Use drawing ...
Read now
Unlock full access