A form contains the WebBrowser control used to display an ActiveX Document. The WhatThisHelp and WhatsThisButton properties are set to True. When you run the project, the WhatThisButton does not display the Help topic associated with the ActiveX Document. The expected behavior is for the appropriate topic from the Help file to appear.
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.
This bug was corrected in Visual Studio 6.0 Service Pack 3.
For more information about Visual Studio service packs, please see the following articles in the Microsoft Knowledge Base:
194022
(http://support.microsoft.com/kb/194022/EN-US/
)
INFO: Visual Studio 6.0 Service Packs, What, Where, Why
194295
(http://support.microsoft.com/kb/194295/EN-US/
)
HOWTO: Tell That Visual Studio 6.0 Service Packs Are Installed
This section shows you how to create a Visual Basic project that demonstrates the bug behavior. The section assumes you have a Windows Help file and are familiar with the following tasks:
- Creating and compiling ActiveX Documents created with Visual Basic.
- Using the WebBrowser Control shipped with Internet Explorer.
- Using ActiveX controls in Visual Basic.
If you are not familiar with these tasks, see the
REFERENCES section of this article for more information.
To create the project, do the following:
- Create and compile an ActiveX document DLL.
- Create a Standard EXE project to contain the WebBrowser control used to display the ActiveX document.
Create and Compile an ActiveX Document
- Start a new ActiveX Document DLL project in Visual Basic. UserDocument1 is created by default.
- Add a TextBox control to UserDocument1.
- In the TextBox property sheet, set the WhatsThisID property to the topic number of your Help file.
- Copy the following code to the Code window of Form1. Add the name of the Help file to the appropriate line:
Option Explicit
Private Sub UserDocument_Initialize()
App.HelpFile = App.Path & "<Help File Name>"
End Sub
- Save the project as UserDocument.vbp. Compile the project into the file UserDocument.dll.
- Close the ActiveX Document project.
After you create the ActiveX Document DLL file, you can create the Standard EXE file that demonstrates the bug behavior.
Create a Standard EXE Project
- Start a new Standard EXE project in Visual Basic. Form1 is created by default.
- Add the Microsoft Internet Controls to the project. For more information about adding ActiveX controls to your project, see the REFERENCES section of this article.
- Add a WebBrowser Control project to your Standard EXE project. WebBrowser1 is created by default.
- In the Form1 property sheet, set the following properties:
- BorderStyle=3-Fixed Dialog
- WhatsThisButton=True
- WhatsThisHelp=True
- Copy the following code to the Code window of Form1. Add the Help file name to the appropriate line:
Option Explicit
Private Sub Form_Load()
App.HelpFile = App.Path & "<Help File Name>"
WebBrowser1.Navigate App.Path & "\UserDocument1.vbd"
End Sub
- On the Run menu, select Start, or press the F5 key to start the program. The ActiveX Document appears in the WebBrowser control. In the Title Bar of Form1, click the Help button. The cursor changes to a question mark. Click the ActiveX Document in the WebBrowser control.
BUG: The appropriate topic from the Help file does not appear. The expected behavior is for the appropriate topic to appear.