Click to See Complete Forum and Search --> : Windows Registering of Comdlg32.ocx


February 4th, 2000, 04:02 PM
I have used Visual Basic 5.0 to build a fairly large program to help
teachers keep track of their students' progress in school. It's been very
successful and I used the feedback from users to produce several updates to
the program.

Then one day disaster struck! I had downloaded and installed a freeware
program which had been written in Visual Basic 6.0. This program replaced
my file c:\Windows\System\Comdlg32.ocx with a Visual Basic 6.0 file. It
caused no problem when running my program, but ever since then I have been
unable to run the program from within Visual Basic 5.0 editor.

The problem seems to be that Visual Basic recognises that a later version
of Comdlg32.ocx has been registered and will then not let me add it as a
component. If I delete the version 6 Comdlg32.ocx file from
Windows\System\ and replace it with the original file I still get an error
when trying to add the version 5 control as a component to the project (or
any new project I try to make). The very helpful(!) error message reads:
" could not be loaded

Does anyone know a way round this without having to reinstall Windows or
upgrade to Visual Basic 6.0? Do I need to tweak some registry settings?

Johnny101
February 4th, 2000, 04:13 PM
My only suggestion is turn off the "Upgrade ActiveX Controls" option in the project's properties in VB. Then I dont' think it will look for the newest version of controls. However, you would have to open the project's .vbp file in notepad and add the line:
NoControlUpgrade=1
just after the HelpFile="" line and before the Title="" line.

This way you can change the option without going to VB, getting the error making the change and then saving the project, which would also save the control reference problem.

Good luck,
John

John Pirkey
MCSD
www.ShallowWaterSystems.com