BUG: Form Key Events Fire Twice with SSTab Control (149273)
The information in this article applies to:
- Microsoft Visual Basic Learning Edition for Windows 5.0
- Microsoft Visual Basic Learning Edition for Windows 6.0
- Microsoft Visual Basic Professional Edition for Windows 5.0
- Microsoft Visual Basic Professional Edition for Windows 6.0
- Microsoft Visual Basic Enterprise Edition for Windows 5.0
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
- Microsoft Visual Basic Standard Edition, 32-bit, for Windows 4.0
- Microsoft Visual Basic Professional Edition, 16-bit, for Windows 4.0
- Microsoft Visual Basic Professional Edition, 32-bit, for Windows 4.0
- Microsoft Visual Basic Enterprise Edition, 16-bit, for Windows 4.0
- Microsoft Visual Basic Enterprise Edition, 32-bit, for Windows 4.0
This article was previously published under Q149273 SYMPTOMS
If an SSTab, SSFrame or SSPanel control has the focus and a key is pressed,
then all of the Form level key events (Form_KeyDown, Form_KeyPress, and
Form_KeyUp) will be fired twice. This problem occurs only if the KeyPreview
property of the form is set to True.
RESOLUTION
It may be possible to write code to ignore the second key event if focus is
on the tab control. This could be done by utilizing a global flag variable
to represent whether or not the key event had been raised before. Aside
from this, the best option is to avoid writing code that depends on this
functionality.
STATUS
Microsoft has confirmed this to be an issue in the Microsoft products
listed at the beginning of this article.
Modification Type: | Major | Last Reviewed: | 6/29/2004 |
---|
Keywords: | kbBug KB149273 |
---|
|