How the Paint Event of a Form WorksID: Q142398 3.00 3.00b WINDOWS kbtool The information in this article applies to:
SUMMARYIn the Help file or reference manual for the Paint event, it says that the Paint event will fire when part or all of a form or toolbar is exposed after it has been moved or sized -- or after a window that was covering the form or toolbar has been moved. This is true, but the Paint event also fires at other times, such as when a value of an object changes or when moving the cursor from one object to another object on the form. With this in mind, you should be aware of the consequences of certain code that is placed in the Paint event.
MORE INFORMATIONThe Paint event is an event of the form and is useful for checking the status of objects, forms, variables, or a toolbar. It is wise to not place any code in the Paint event that would affect the size or appearance of any objects or properties. Changing the caption of an object or changing the value of an object on a form would be examples of code that would make the form act strange.
Example1. Create a form and add a new property for the form. On the Form menu, 2. Add a text box to the form.
3. In the Paint event of the form, add the following code:
4. Run the form. Note that the text box is being constantly updated with a
Additional reference words: 3.00 3.00b VFoxWin
KBCategory: kbtool
KBSubcategory: FxtoolFormdes
|
Last Reviewed: January 16, 1996 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |