BUG: Resetting ListIndex Property Generates Click Event (79241)
The information in this article applies to:
- Microsoft Visual Basic Standard Edition for Windows 2.0
- Microsoft Visual Basic Standard Edition for Windows 3.0
- Microsoft Visual Basic Professional Edition for Windows 2.0
- Microsoft Visual Basic Professional Edition for Windows 3.0
- Microsoft Visual Basic Standard Edition for Windows 1.0
This article was previously published under Q79241 SYMPTOMS
Resetting the ListIndex property of a list box, combo box, directory
list box, or a file list box at run time generates a Click event for
the control. For a drive list box, resetting the ListIndex property
generates a Change event.
CAUSE
This is a result of the Windows subclass definition for these
controls. When an item in one of these list boxes is selected, a Click
event (or Change event for drive list box) occurs and the ListIndex
property is updated. Conversely, when the ListIndex property is
changed, a message occurs, generating the corresponding event.
WORKAROUND
Use the KeyUp procedure instead of click, and then call KeyUp when
a key is pressed.
STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed
at the beginning of this article. Microsoft is researching this problem and
will post new information here in the Microsoft Knowledge Base as it
becomes available.
REFERENCES
"Programming Windows: the Microsoft Guide to Writing Applications for
Windows 3," by Charles Petzold, Microsoft Press, 1990
"Microsoft Windows Software Development Kit: Reference Volume 1,"
version 3.0
WINSDK.HLP file shipped with Microsoft Windows 3.0 Software
Development Kit
| Modification Type: | Major | Last Reviewed: | 12/12/2003 |
|---|
| Keywords: | kbbug KB79241 |
|---|
|