CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Guest

    Windows Registering of Comdlg32.ocx

    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?


  2. #2
    Join Date
    Jan 2000
    Location
    MO, USA
    Posts
    1,506

    Re: Windows Registering of Comdlg32.ocx

    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
    John Pirkey
    MCSD (VB6)
    http://www.stlvbug.org

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured