Visual Basic Concepts
In order to view the FirstDoc document, you must first run the ActXDoc project, then run another container application in which to view the FirstDoc document. In this procedure, you will run Internet Explorer (included with Visual Basic), and navigate to a .vbd file to open the ActiveX document (a .vbd file is automatically generated for every ActiveX document in a project whenever the project is run).
Note This topic is part of a series that walks you through creating a sample ActiveX document. It begins with the topic Creating an ActiveX Document.
To view the FirstDoc ActiveX document
The project is now running. If you use Windows Explorer to view the directory where Visual Basic resides, you will find a FirstDoc.vbd file.
Debugging an ActiveX document is similar to debugging other ActiveX components. You can use all the tools available in Visual Basic — setting breakpoints, watching variables, using debug statements, and so on.
It's also important to remember that the container hosting the ActiveX document is its client — using objects the ActiveX document provides. While the host container is accessing the ActiveX document, stopping the project will cause an error in the host container. To avoid this, at the end of each of these procedures you will quit Internet Explorer to release the reference.
For More Information For alternatives that cause Internet Explorer to release your ActiveX document, see "Debugging ActiveX Documents" in "Building ActiveX Documents."
If you are running a project and are viewing it in Internet Explorer, you can put it into break mode (by pressing CTRL+BREAK) without causing any errors in the host application. However, be aware that modifying any code that causes Visual Basic to reset the project should be avoided.
To add a Stop statement to an ActiveX document
Private Sub cmdNavigateTo_Click()
Stop ' <--- Add this to the procedure.
Hyperlink.NavigateTo txtURL.Text
End Sub
This topic is part of a series that walks you through creating a sample ActiveX document.
To | See |
Go to the next step | Adding a Second ActiveX Document to the ActXDoc Project |
Start from the beginning | Creating an ActiveX Document |