BUG: SetFocus Changes CommandButton Value to True (180762)
The information in this article applies to:
- Microsoft Windows CE Toolkit for Visual Basic 6.0
- Microsoft eMbedded Visual Basic 3.0
This article was previously published under Q180762 SYMPTOMS
When the Value property of a CommandButton is set to False and the SetFocus
method of the CommandButton is executed, the CommandButton Value property
is set to True.
RESOLUTION
Set the Value property of the CommandButton to False after the SetFocus
method is called, as follows:
Private Sub Command2_Click()
If Command1.Value = False Then
Command1.SetFocus ' Set focus to Command1.
Command1.Value = False ' Set the Value property back to False.
MsgBox "Command1.Value = " & Command1.Value
Else
Command1.SetFocus 'Set focus to Command1.
End If
End Sub
STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.
Modification Type: | Minor | Last Reviewed: | 3/11/2005 |
---|
Keywords: | kbBug kbpending kbToolkit KB180762 |
---|
|