BUG: OLE AutoActivate Property Fails When Set To "1 - GotFocus"
Article ID: 169611
Article Last Modified on 6/24/2004
APPLIES TO
- Microsoft Visual Basic 5.0 Control Creation Edition
- Microsoft Visual Basic 5.0 Learning Edition
- Microsoft Visual Basic 6.0 Learning Edition
- Microsoft Visual Basic 5.0 Professional Edition
- Microsoft Visual Basic 6.0 Professional Edition
- Microsoft Visual Basic 5.0 Enterprise Edition
- Microsoft Visual Basic 6.0 Enterprise Edition
- Microsoft Visual Basic 4.0 Standard Edition
- Microsoft Visual Basic 4.0 Professional Edition
- Microsoft Visual Basic 4.0 Enterprise Edition
This article was previously published under Q169611
SYMPTOMS
The Visual Basic OLE Container Control has an AutoActivate property that
enables a user to activate an OLE object in different ways. Setting this
property to "1 - GetFocus" does not automatically activate the application
that provides the OLE object when the OLE container control receives the
focus.
RESOLUTION
To work around this bug, code needs to be added to the OLE Container
Control's GotFocus event to automatically activate the application that
provides the OLE object when the control receives the focus. The following
code makes the OLE Container Control behave as though its AutoActivate
property were set to "1 - GotFocus":
Private Sub OLE1_GotFocus()
OLE1.DoVerb (vbOLEShow)
End Sub
STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed
at the beginning of this article. We are researching this bug and will post
new information here in the Microsoft Knowledge Base as it becomes
available.
REFERENCES
For more information about the DoVerb method of OLE Container control
search the on-line Help for the topic "DoVerb."
Additional query words: kbole
Keywords: kbbug KB169611