BUG: Focus Events not Triggered in ActiveX Document when Using Accelerator Keys (236778)



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 Q236778

SYMPTOMS

When an ActiveX Document is hosted inside Internet Explorer, the focus events are not triggered when using accelerator keys to navigate the controls.

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

MORE INFORMATION

Steps to Reproduce

  1. Start a new ActiveX Document project(either DLL or EXE). Default name is "Project1" and it contains one user control "UserDocument1".
  2. Place three labels (Label1, Label2, Label3) and two Text boxes (Text1, Text2).
  3. Arrange controls so that Text1 is next to Label1 and Text2 is next to Label2.
  4. Set the order of TabIndex as Label1, Text1, Label2, Text2, Label3.
  5. Change the label caption of Label1 as Label&1 and Label2 as Label&2. Remove the caption of Label3.
  6. Paste the following code in the UserDocument1's code:
       Private Sub Text1_LostFocus()
          Label3.Caption = Label3.Caption & "Text1_LostFocus "
       End Sub
    
       Private Sub Text2_GotFocus()
          Label3.Caption = Label3.Caption & "Text2_GotFocus "
       End Sub
    					
  7. Run the project and start the component in UserDocument1.
  8. When using the accelerator keys ALT+1 and ALT+2, the focus can shift from Text1 to Text2, but the lost_focus event of Text1 and the get_focus event of Text2 are not triggered (while TAB triggers both of those events).

Modification Type:MajorLast Reviewed:5/10/2003
Keywords:kbActiveDocs kbbug kbpending KB236778