advr.hlp (Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
Paint Event Details
  Summary  Details  Example                Contents  Index  Back
──────────────────────────────────────────────────────────────────────────────
 SUB Form_Paint ()
 SUB ctlname_Paint ([Index AS INTEGER])
 
 Usage Notes
   ■ Your application may need to redraw data in a newly uncovered area.
     This applies only when a related property, AutoRedraw, is set to False
     (0), the default setting. When AutoRedraw is set to True (-1), then
     repainting or redrawing is automatic; no Paint events occur.
 
   ■ A Paint event procedure is useful if you have output from the PRINT
     method in your code. With a Paint procedure, you can ensure that such
     output is repainted when necessary.
 
   ■ Using a Paint event procedure for certain tasks can cause a cascading
     event. Avoid using a Paint event for:
     • Moving or sizing the current form or control
     • Changing variables that affect size or visual appearance, such as
       setting an object's BackColor property
     • Invoking the REFRESH method on the current form or control
 
     Note: A Resize event procedure may be more appropriate for some of these
     tasks, but only when objects are being resized larger. Putting a REFRESH
     method in a Resize event procedure causes repainting every time a form
     is resized. See: Resize Event