1. When using method NavigateTo, the protocol portion of the URL must be included. For example, in the default, the above code will be positioned to the properties of the TEXT property of the TxtURL TextBox control: "http://www.microsoft.com". 2. Remember the following important facts: The container program for hosts as an ActiveX document is actually an ActiveX document, as it uses objects provided by the ActiveX document. When the host container is accessing the ActiveX document, the interrupt of engineering operation will result in an error in the host container program. In order to avoid this, the Internet Explorer should be exited at the end of the operation to release references to the ActiveX document. 3. If there is only one ActiveX document in a project, it is almost no difference in only one form in the project, and the ability is limited. To enhance your ability, you can add a second ActiveX document in the ACTXDoc documentation. 4. Unlike standard Visual Basic forms, you cannot use the show method to display the ActiveX document. This is because the container program (in this example is Internet Explorer) decides when to display and hide the ActiveX document. Therefore, you must move from an ActiveX document to another ActiveX document. When positioning an ActiveX document, you can use the HyperLink object and its NavigateTo method. 5. Similar to other Visual Basic projects, adding a form to the FirstDoc ActiveX project is a very simple thing. Adding controls in the form is identical to the added process of the standard Visual Basic project. Of course, the main difference is that the form must be called by the ActiveX document. 6. Some container programs, such as Internet Explorer, is not capable of displaying a modular form called from the DLL. If you want to display a modeless form, you must compile the ActiveX document into .exe file. Thus, the application can display both a modal form or a mode form. 7. Similar to the UserControl object, you can create public properties for the UserDocument object. When you create a public property, you need to disclose this property, allowing other applications to set or get its attribute values. 8. Save the use of global variables to firstdoc UserDocument is a very bad practice 9. Use the menu editor to add a menu for the ActiveX document. Because the ActiveX document cannot have a separate menu, its menu is always menu to browse the application of the application to the ActiveX document. So, you must consider the menu protocol when adding menus to the ActiveX document.
Summary the creation process of the ActiveX document
If you want to create a new ActiveX document, you should usually follow these steps:
Determine the functions to provide by the document. Design document appearance. Design the interface of the document; that is, the properties, methods, and events of documents. Create an engineering that contains user documents and auxiliary forms. Add a control and / or add code to the UserDocument object. Implement the interface and function of the document. Compile a document to generate a .vbd file. Use various applications to test it as much as possible.