Visual Basic Concepts
Code components are .exe or .dll files, rather than .ocx files. For client-side deployment, you can reference and script ActiveX components with the same kinds of HTML and VBScript code you might use for ActiveX controls. You perform the following steps to deploy a code component to a client:
The following code shows a sample of what your HTML might look like for a button that references a Login dialog box:
<FORM NAME="LoginButton">
Click here to log in:
<INPUT NAME="cmdLogin" TYPE="Button" VALUE="Log in…">
</FORM>
Note See "Manually Deploying ActiveX Controls" for an example of the OBJECT tag.
<SCRIPT LANGUAGE="VBScript">
' Create variables for the HTML form containing the
' button, and for the object exposing the method that
' shows the dialog box.
Dim dlgLogin
Dim TheForm
Set TheForm = ActiveX document.LoginButton
' Include a procedure that shows the dialog box
' when the button is clicked.
Sub cmdLogin_onClick
Set dlgLogin = Login
dlgLogin.ShowDialog
End Sub
</SCRIPT>
In this example, the component itself would include code that forms the login string and sends it to the server for validation.