PRB: MDI Child Form Painted Twice When Moved Before LoadedLast reviewed: June 21, 1995Article ID: Q109801 |
The information in this article applies to:
- The Standard and Professional Editions of Microsoft Visual Basic for Windows, version 3.0
SYMPTOMSIf you Load an MDI child form and then change the position or size of the MDI child form, it gets painted twice -- once in a default starting position and then in its final position.
CAUSEWhen you access any properties of a form that is not currently loaded, the form is loaded immediately. Note that the Move method simply sets the Left, Top, Width, and Height form properties. Since MDI child forms cannot have their Visible property False, they cannot be loaded without being Visible. Therefore, when you try to set the position or size properties of an MDI child form before showing it, the MDI child form appears in a default position before your new settings take effect.
RESOLUTIONInitialize the position of MDI child forms from within their own Form_Load event handler. The Form_Load event handler is executed before the form actually becomes visible.
MORE INFORMATION
Steps to Reproduce Behavior
|
Additional reference words: 3.00
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |