FIX: CommandButton Receives Keystroke from Open Dialog |
Q181010
If a CommandButton has the focus and is used to open a MessageBox, InputBox, or form, when you use the ENTER key to close the MessageBox, InputBox, or form, the Click event procedure of the CommandButton executes.
The ENTER key strokes returned from an open dialog or other form are interpreted by a CommandButton as a Click event.
There are two workarounds for this problem.
Msgbox "All Done"
Text1.SetFocus Microsoft has confirmed this to be a problem in the Microsoft products that are listed
at the beginning of this article.
This problem was corrected in Windows CE Toolkit for Visual Basic 6.0.
This problem occurs when using the ENTER key to close a MessageBox, an InputBox, or another form:
Private Sub Command1_Click()
MsgBox "Command1.Click"
End Sub
Private Sub Text1_Click()
MsgBox "Text1.Click"
End Sub Books Online for Microsoft Windows CE Toolkit for Visual Basic 5.0
Additional query words: wce vbce vbce5 vbce6
Keywords : kbToolkit kbVBp kbVBp500bug kbVBp600fix kbOSWinCEsearch kbOSWinCE100 kbGrpDSVB
Issue type : kbbug
Technology : kbVBSearch kbAudDeveloper kbWinCETKVBSearch kbWinCESearch kbWinCETK100VB500
|
Last Reviewed: February 27, 1999 © 2001 Microsoft Corporation. All rights reserved. Terms of Use. |