PRB: MouseMove Events Fires on Disabled Control in VFPLast reviewed: September 15, 1997Article ID: Q173782 |
The information in this article applies to:
SYMPTOMSIn Visual FoxPro 3.x and 5.x, the MouseMove event fires when you move over a disabled control. This behavior may confuse some developers because the MouseMove event does not fire on a disabled control in Visual Basic 5.0 and Microsoft Access 97.
RESOLUTIONYou must write code to determine the status of the Enabled property of the object and then conditionally perform the MouseMove event method code. The following code checks if the object's Enabled property is true and if so, permits your MouseMove method code to conditionally execute.
IF This.Enabled=.t. ThisForm.Command2.Visible=.f. ENDIF STATUSThis behavior is by design.
MORE INFORMATIONThis is the desired behavior in Visual FoxPro. Since Visual FoxPro does not automatically disable the MouseMove event of a disabled object, it offers you more flexibility in application design. If you want to emulate the behavior found in Visual Basic or Microsoft Access 97, see the RESOLUTION section above.
Steps to Reproduce Behavior
|
Additional query words: MouseMove Access Visual Basic
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |