Home Tips and Tricks how to install VB runtime DLLs, and the Common Controls and Common Dialogs
how to install VB runtime DLLs, and the Common Controls and Common Dialogs
Tips and Tricks

Download the required version and unzip the files into a separate location. For safety do not directly overwrite the Windows\System directory. Unregister the old controls and move them to a temporary location. Then copy the new controls to the System folder and register them. You can register the new controls wherever they are, but some depend on DLLs in the System folder and may not work in another location. To switch back to the original files, reverse the process.

More points to note:

  • Any installation program may install and register a newer version of an OCX without the user noticing, because all existing programs still run. If you install a program written using VB6 it is very likely to install the VB6 versions of the controls to the System folder, overwriting older versions.
  • OCX files may be placed anywhere on the disk, it is only convention to put them in the Windows System folder. If there are different versions of the same file in different places, only the most recently registered one is accessible. As already noted, they may not work in other places due to regular (non-COM) DLL dependencies.
  • Under Windows NT, if you move a registered OCX the Windows registry is updated to point at the new location. If the file is deleted to the recycle bin, the registry points there.
  • VB6 introduced a completely new common control file called MSCOMCTL.OCX. This does not cause any problems because the GUID was changed along with the file name. We are concerned here with the modified versions of the VB5 controls which VB6 also installs.
Registering controls

To register an OCX type at the command prompt
regsvr32 whatever.ocx

To unregister an OCX type at the command prompt
regsvr32 -u whatever.ocx

You can also add right click context menu items to OCX files to perform these operations. It is convenient to use the free File Association Editor, whose help file details the registry entries required.

 
User Rating: / 2
PoorBest 

Share 2 Friends