PRB: Line Drawn with Line Method Is Behind Form's ObjectsID: Q142399 3.00 3.00b WINDOWS kbtool kbprb The information in this article applies to:
SYMPTOMSUsing the form's Line method to draw a line over an object during the form's initialization causes the line to be behind the object.
CAUSEIf the Line method is called from either the form's Init event, or any other event that fires when the form is initially started, the line will actually be drawn prior to the placement of the form's objects. On slower computers, this can be easily visualized. Because the line that is produced by using the Line method of a form is not an object and therefore lacks any properties that can be manipulated, it is not possible to force it to the front of the object.
WORKAROUNDFollowing are three possible workarounds, in order of preference:
STATUSThis behavior is by design.
MORE INFORMATION
Steps to Reproduce Behavior1. Create a new form, and use the Form Controls toolbar to place a Shape on 2. Set the DrawWidth property of the form to 10. This will cause the line
3. With the Shape as the selected object on the form, change its BackColor
4. In the form's Init event, add the following code:
5. Save the form as linetest. Then close the form, and use the DO FORM
Additional reference words: 3.00 3.00b VFoxWin
KBCategory: kbtool kbprb
KBSubcategory: FxtoolFormdes
|
Last Reviewed: January 16, 1996 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |