Microsoft KB Archive/88663

= Disabled Controls Do Not Generate Click Events on Parent =

PSS ID Number: 88663

Article Last Modified on 1/8/2003

-

The information in this article applies to:


 * Microsoft Visual Basic for MS-DOS 1.0

-



This article was previously published under Q88663



SYMPTOMS
If a control is disabled (Enabled property = 0) and you click on that control, Visual Basic for MS-DOS does not generate a Click event for the parent form. A Click event for a parent picture box is also not generated when clicking a disabled child control.



STATUS
Microsoft has confirmed this to be a bug in the Standard Edition of Microsoft Visual Basic for MS-DOS, version 1.0. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.



MORE INFORMATION
This problem may prevent your program from displaying help, for example, when the user clicks on a disabled control.

A Click event is correctly generated in this situation in Microsoft Visual Basic for Windows.

Steps to Reproduce Problem
 Run Visual Basic, or from the File menu, choose New Project (ALT, F, N) if Visual Basic is already running. From the File menu, choose New Form (ALT, F, F). Form1 is created by default. Place a command button (Command1) on Form1. From the Edit menu, choose Event Procedures (or press F12).  Add the following code: Sub Form1_Click MSGBOX &quot;Form was clicked&quot; End Sub

Sub Command1_Click Command1.Enabled = 0 End Sub  From the Run menu, choose Start (or press SHIFT+F5).</li> Click on the form--the message box will appear. Choose the OK button.</li> Click on Command1. The command button is grayed out to indicate that it is disabled. If you click on the disabled command button again, the message box will not appear because a Click event was not generated for the parent form.</li></ol>

Additional query words: VBmsdos buglist1.00 1.00

Keywords: KB88663

Technology: kbAudDeveloper kbVB100DOS kbVBSearch kbZNotKeyword3

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© 2004 Microsoft Corporation. All rights reserved.