To run your application under Microsoft Windows outside of Visual Basic, you need to create an executable (.exe) file. You create executable files for applications that use ActiveX controls the same as you would for any other application. There are a few issues to consider, however, when running such an application.
An ActiveX control file is accessed both by Visual Basic and by applications created with Visual Basic. When you run an executable file that contains an ActiveX control, the .ocx file associated with it must be registered in the system registry. Otherwise, the application will not be able to find the code needed to create the control.
If a control cannot be found, the Visual Basic run-time DLL generates the error message "File Not Found." If you want to distribute an application that uses ActiveX controls, it is recommended that your installation procedure copy all required .ocx files into the user's \Windows\System directory. Your installation procedure should also register the required controls in the system registry.
You can freely distribute any application you create with the Visual Basic to any Microsoft Windows user. The Package and Deployment Wizard included with Visual Basic provides tools to help you write setup programs that install your application. Users will need copies of the following: