BUG: WM_LBUTTONUP Message May Not Fire (240749)
The information in this article applies to:
- Microsoft Visual Basic Learning Edition for Windows 6.0
- Microsoft Visual Basic Professional Edition for Windows 6.0
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
This article was previously published under Q240749 SYMPTOMS
If the validate event of a TextBox displays a MessageBox, shifting the focus to another control using the mouse causes the MessageBox to display. It also causes the WM_LBUTTONUP message for the control receiving the focus to be lost.
For example, if the control that is receiving the focus is a CommandButton, the Click event is not fired. If the control that is receiving the focus is a TextBox, notice that it appears to be in the selection state as if the left-mouse button is pressed.
CAUSE
When the message box is displayed, the focus moves to the message box, so the control that gets the focus does not get the WM_LBUTTONUP message.
RESOLUTION
To solve the problem, you can send a WM_LBUTTONUP message programmatically to the control that gets the focus.
STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.
Modification Type: | Major | Last Reviewed: | 5/13/2003 |
---|
Keywords: | kbBug kbpending KB240749 |
---|
|