Can the ActiveX control be used in Visual Basic without a form?
Yes, there are two ways that the control can be used without a form in Visual Basic. One is to create a reference to the control by selecting Project | References from the menu, then clicking on the Browse button and selecting the control’s file name. Then, in the program, an instance of the control can be created using the Dim statement as follows: Dim objSocket As New SocketWrench The other approach is to use the CreateObject method: Dim objSocket As Object Dim strLicenseKey As String Set objSocket = CreateObject(“SocketTools.SocketWrench.5”) objSocket.Initialize strLicenseKey Note that the strLicenseKey value must be obtained from the cswskey5.bas module that was created in the \Include folder where the product was installed. The Initialize method must be called explicitly when using the CreateObject function; otherwise a licensing error will occur when redistributing the application.