Microsoft Visual Basic 6.0 is a powerful platform for creating Windows applications. It installs a number of OCX files with its installation process. However, developers often unregister these files while they are working on projects in Visual Basic. If you have unregistered a Visual Basic 6.0 OCX and want to register it again, you can do so from within the Visual Basic program itself using a few commands and some code provided by Microsoft.
- Skill level:
Other People Are Reading
Open Visual Basic 6.0 from a desktop shortcut or your Start menu. Choose "File," then "New Project." Set the type as "Standard EXE."
Add a new module to the project. Name the module "Module1" or any other basic title you prefer.
Copy the example code provided by Microsoft (see References) into the "General Declarations" section of the module you created. Replace all instances of "ComCtl32" in the code with the name of the Visual Basic 6.0 OCX file that you want to register.
Press "Control" and "G"at the same time to view the immediate window. Type in "RegisterYourOCX" where "YourOCX" is the name of the OCX file you are registering ("ComCtl32" in the example). Press "Enter" to register the OCX file.
Tips and warnings
- You must replace all instances of "ComCtl32 " in the sample code with the name of the OCX file you want to register or Visual Basic will not correctly register the OCX.
- 20 of the funniest online reviews ever
- 14 Biggest lies people tell in online dating sites
- Hilarious things Google thinks you're trying to search for