As with other Visual Basic projects, it's a simple matter to add a form to the FirstDoc ActiveX project. Adding controls to the form is exactly the same as in a standard Visual Basic project. The primary difference, of course, lies in the fact that forms must be called by the ActiveX document.
In this step-by-step procedure, you add a single form to the ActXDoc project.
Note This topic is part of a series that walks you through creating a sample ActiveX control. It begins with the topic Creating an ActiveX Document.
To add a form to the ActXDoc project
Form1 property | Value |
Name | frmAux |
Caption | Auxiliary Form |
Text1 property | Value |
Name | txtAux |
MultiLine | True |
Text | (nothing) |
Command1 property | Value |
Name | cmdShowForm |
Caption | Show Form |
Private Sub cmdShowForm_Click()
' Show the auxiliary form, and set the Text
' property of txtAux to the URL of FirstDoc.
frmAux.txtAux.Text = txtURL.Text
frmAux.Show vbModal
End Sub
Important Some containers, such as Internet Explorer, don't support the showing of modeless forms called from within a DLL. If you want to show modeless forms, compile your ActiveX document as an .exe file. This will allow your applications to show both modeless and modal forms.
You can now run the project and observe the interaction of the form with the ActiveX document.
To view the new form interacting with the ActiveX document
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 Property to the UserDocument |
Start from the beginning | Creating an ActiveX Document |