DOCUMENT:Q173212 15-SEP-1997 [vbwin] TITLE :BUG: "Default" Property Ignored for Command Button on Win NT PRODUCT :Microsoft Visual Basic for Windows PROD/VER:WINDOWS:5.0 OPER/SYS:WINDOWS KEYWORDS:PgmCtrlsStd ====================================================================== --------------------------------------------------------------------- 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 platform: - Windows NT --------------------------------------------------------------------- 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 operation system. 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. We are researching this bug and will post new information here in the Microsoft Knowledge Base as it becomes available. MORE INFORMATION ================ Steps to Reproduce Behavior --------------------------- 1. Create a new Standard EXE project. 2. Add a reference to the "Windows Common Controls" (COMCTL32.OCX). 3. Add a command button to the default form. 4. Set the Default property of the command button to True. 5. Paste the following code in the code window of the form: Private Sub Command1_Click() MsgBox "Click Event Has Been Fired" End Sub 6. Place a TextBox, ListView, and a Slider control on the form. 7. Save and run the application. 8. Set the focus on the TextBox and press Enter. Result: The command button's Click event fires and the message box appears as expected. 9. Set the focus on either the Slider or the ListView controls. 10. Press Enter. Result: The command button's Click event does not fire and the message box does not appear. ====================================================================== Keywords : PgmCtrlsStd Version : WINDOWS:5.0 Platform : WINDOWS Issue type : kbbug ============================================================================= THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY. Copyright Microsoft Corporation 1997.