FIX: "Default" Property Ignored for CommandButton on Win NT
ID: Q173212
|
The information in this article applies to:
-
Microsoft Visual Basic Control Creation, Learning, Professional, and Enterprise Editions for Windows, version 5.0
on the following platforms: Windows NT, Windows 98
SYMPTOMS
When you use either the Slider control or the ListView control provided by
the COMCTL32.OCX (version 5.00.3717 or 5.00.3828), the "Default" property
of a command button is ignored. No error occurs, but the button's Click
event is not executed.
This behavior only occurs under the Windows NT and Windows 98 operation
systems. This does not occur under Windows 95.
STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed
at the beginning of this article. This bug has been fixed in Visual Basic
6.0.
MORE INFORMATION
Steps to Reproduce Behavior
- Create a new Standard EXE project. Form1 is created by default.
- Add a reference to the "Windows Common Controls" (COMCTL32.OCX).
- Add a CommandButton on to the default form.
- Set the Default property of the CommandButton to True.
- Paste the following code in the code window of the form:
Private Sub Command1_Click()
MsgBox "Click Event Has Been Fired"
End Sub
- Place a TextBox, ListView, and a Slider control on the form.
- Save and run the application.
- Set the focus on the TextBox and press the ENTER key.
RESULT: The CommandButton's Click event fires and the message box
appears as expected.
- Set the focus on either the Slider or the ListView controls.
- Press Enter.
RESULT: The CommandButton's Click event does not fire and the message
box does not appear.
Additional query words:
kbVBp500bug kbVBp600fix kbVBp kbDSupport kbdsd kbControl
Keywords : kbGrpVB
Version :
Platform : WINDOWS
Issue type : kbbug