Results 1 to 31 of 31

Thread: [RESOLVED] Components do not load

  1. #1

    Thread Starter
    Member
    Join Date
    Feb 2008
    Posts
    49

    Resolved [RESOLVED] Components do not load

    This is a follow up on an earlier post. I am using VB 6.0 sp6. I have Internet Explorer 10 on the computer.
    When I load an existing project none of the components load into the project. I did register one of them with regsvr32.exe successfully to see if that makes any difference. It did not. I get the messages that the ocx could not be loaded. I reinstalled VB but that did not make any difference.
    I run VB as an administrator. I am getting desperate. I was running VB without any problem and suddenly this happens. I read somewhere that IE 10 has something to do with this. Does anybody know?

    Any solution?

    Peter Schoots

  2. #2
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    9,017

    Re: Components do not load

    Could you post a screen shot of what is happening ?
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  3. #3

    Thread Starter
    Member
    Join Date
    Feb 2008
    Posts
    49

    Re: Components do not load

    Name:  VB6-1.jpg
Views: 8199
Size:  146.5 KBName:  vb6-2.jpg
Views: 7739
Size:  175.2 KB

  4. #4
    Banned
    Join Date
    Nov 2012
    Posts
    1,171

    Re: Components do not load

    download msmap32.ocx or what ever its written there, then google search how to register ocx on your pc, problem solved

  5. #5

    Thread Starter
    Member
    Join Date
    Feb 2008
    Posts
    49

    Re: Components do not load

    In the meantime I might have figured out what caused this problem . A few weeks ago I received an update for Flash. Unbeknown to me it also installed the Chrome browser (unbelievable evil). I uninstalled the Chrome browser. From that moment on web site links in emails etc. would not work anymore. I found out that this is a known issue. I ran a Microsoft fix which solved that problem. The program is MicrosoftFixit20056.mini.diagcab. It just dawned on me that this might be causing the VB problem I am having.

  6. #6

    Thread Starter
    Member
    Join Date
    Feb 2008
    Posts
    49

    Re: Components do not load

    I did register the ocx and it did not make any difference.

  7. #7
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    9,017

    Re: Components do not load

    Quote Originally Posted by Peter Schoots View Post
    In the meantime I might have figured out what caused this problem . A few weeks ago I received an update for Flash. Unbeknown to me it also installed the Chrome browser (unbelievable evil). I uninstalled the Chrome browser. From that moment on web site links in emails etc. would not work anymore. I found out that this is a known issue. I ran a Microsoft fix which solved that problem. The program is MicrosoftFixit20056.mini.diagcab. It just dawned on me that this might be causing the VB problem I am having.
    So it fixed your VB problem or just the email problem ?
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  8. #8

    Thread Starter
    Member
    Join Date
    Feb 2008
    Posts
    49

    Re: Components do not load

    It fixed the email problem Clicking on a link does work now. The VB problem started just around that time (only a week or so ago) and is still there.

  9. #9
    Banned
    Join Date
    Nov 2012
    Posts
    1,171

    Re: Components do not load

    download that ocx file , and add as reference , save project, close and reopen

  10. #10
    PowerPoster
    Join Date
    Jun 2001
    Location
    Trafalgar, IN
    Posts
    4,141

    Re: Components do not load

    If you uncheck the "Selected items only" checkbox in the components dialog, do you find the msmap32.ocx in the list? If so, select it and see what happens. If not then use the Browse button and browse to it and then select it.

  11. #11

    Thread Starter
    Member
    Join Date
    Feb 2008
    Posts
    49

    Re: Components do not load

    If I uncheck "Selected Items only" I see all the components. None of them will load when I click on them.

  12. #12
    Addicted Member
    Join Date
    Dec 2008
    Posts
    129

    Re: Components do not load

    It looks like there aren't any components loaded.

    Maybe this:

    Code:
    @echo off
    C:
    cd \.
    cd %systemroot%\system32
    for %%f in (*.ocx *.dll) do regsvr32 /s %%f
    cd \.
    cd %systemroot%\sysWOW64
    for %%f in (*.ocx *.dll) do regsvr32 /s %%f
    Not sure if this will work, but you can give it a try.

  13. #13

    Thread Starter
    Member
    Join Date
    Feb 2008
    Posts
    49

    Re: Components do not load

    Since none of the ocx files load I don't think it is issue with an individual file.
    I don't understand registration procedures (am an amateur ).
    I downloaded RegdllView program to have a look at the register. I pick comdlg32.dll as an example.
    First of all RegdllView shows that the file is registered. When I try to re-register it in RegdllView
    I get the message "Failed to register. Error 127. The specified procedure could not be found."
    When I tried to register the same file dll with regsvr32.exe I get the message "The module c:\windows\system32\comdlg32.dll was loaded but the entry point DllRegisterServer was not found.
    Make sure that c:\windows\system32\comdlg32.dll is a valid the dll or ocx file.

    I don't understand any of it.

  14. #14
    Addicted Member
    Join Date
    Dec 2008
    Posts
    129

    Re: Components do not load

    Since none of the ocx files load I don't think it is issue with an individual file.
    I don't understand registration procedures (am an amateur ).
    I downloaded RegdllView program to have a look at the register. I pick comdlg32.dll as an example.
    First of all RegdllView shows that the file is registered. When I try to re-register it in RegdllView
    I get the message "Failed to register. Error 127. The specified procedure could not be found."
    When I tried to register the same file dll with regsvr32.exe I get the message "The module c:\windows\system32\comdlg32.dll was loaded but the entry point DllRegisterServer was not found.
    Make sure that c:\windows\system32\comdlg32.dll is a valid the dll or ocx file.

    I don't understand any of it.
    Certain DLLs won't register if they are not ActiveX DLLs. comdlg32 is not an ActiveX DLL, that's why you're getting that error. Did you try my batch file code in my previous post?

  15. #15

    Thread Starter
    Member
    Join Date
    Feb 2008
    Posts
    49

    Re: Components do not load

    I will try your code if you tell me how to do it. It does not look like VB to me. I see though that it uses regsvr32.exe to register the files but that is what I have been doing on individual files all along. It does not seem to work.
    I am grateful for your suggestions and will try the code if you tell me where to put it. At least I will learn something.

  16. #16
    Default Member Bonnie West's Avatar
    Join Date
    Jun 2012
    Location
    InIDE
    Posts
    4,060

    Re: Components do not load

    Quote Originally Posted by Peter Schoots View Post
    I will try your code if you tell me how to do it. It does not look like VB to me.
    veebee123's code is a batch script. It is executed by cmd.exe.

    Quote Originally Posted by Peter Schoots View Post
    I see though that it uses regsvr32.exe to register the files but that is what I have been doing on individual files all along. It does not seem to work.
    The batch script just automates registering all the OCXs and DLLs in the system32/sysWOW64 directories.
    On Local Error Resume Next: If Not Empty Is Nothing Then Do While Null: ReDim i(True To False) As Currency: Loop: Else Debug.Assert CCur(CLng(CInt(CBool(False Imp True Xor False Eqv True)))): Stop: On Local Error GoTo 0
    Declare Sub CrashVB Lib "msvbvm60" (Optional DontPassMe As Any)

  17. #17

    Thread Starter
    Member
    Join Date
    Feb 2008
    Posts
    49

    Re: Components do not load

    I remember using DOS in the past but don't remember how to do it. I pasted your code in the command window. It generates lines with "%%f is unexpected .."
    Once this is fixed how do you run the code. I clicked on F5 but don't really know.

  18. #18
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    9,017

    Re: Components do not load

    Actually, hold on a second here. Are you using Windows 7 or 8 by any chance ? I think I may know what the problem is.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  19. #19
    Addicted Member
    Join Date
    Dec 2008
    Posts
    129

    Re: Components do not load

    I remember using DOS in the past but don't remember how to do it. I pasted your code in the command window. It generates lines with "%%f is unexpected .."
    Once this is fixed how do you run the code. I clicked on F5 but don't really know.
    Open notepad. Paste all the code and save it as a .bat file (not .bat.txt) just .bat. Then right click the file and run as admin.

    There are a lot of cases where you may need to use a .bat file so it's good to know even if it doesn't work.

  20. #20

    Thread Starter
    Member
    Join Date
    Feb 2008
    Posts
    49

    Re: Components do not load

    I am using Windows 7.

  21. #21
    PowerPoster
    Join Date
    Aug 2011
    Location
    B.C., Canada
    Posts
    2,887

    Re: Components do not load

    Quote Originally Posted by Peter Schoots View Post
    I am using Windows 7.
    Yes with Windows 7 sometimes using the command prompt elevated is the way to go, if you need to register a component. Post #12 would work, though you only need to register 1 file.. I would use
    (Make sure you run Command Prompt AS ADMINISTRATOR, right click on the file and run as administrator)

    Code:
    regsvr32 C:\Windows\System32\file.ocx 
    'or
    regsvr32 C:\Windows\SysWOW64\file.ocx
    without the /s (silent) so you see when it is registered
    also replacing file.ocx with your real ocx file name

    When your done and it is registered properly you will need to open you project (run it as administrator, or make VB6.EXE always run as Administrator) click ok if error comes up (it's OK).
    Do what MarkT (Post #10) said. Go to your component list where you select which component to add unselect the component that is doing the error if it's in the list.
    Then go to browse and browse to the .ocx file you have just registered in the command prompt console, if it's system32 then you browse to C:\Windows\System32\file.ocx ... if syswow64 then C:\Windows\SysWOW64\file.ocx. Ok now select it from the list of components click Apply then click OK. Now save your project. Close and Re-Open your project, let me know if any errors appear!

    Note:
    Sometimes you need to remove the usercontrol from your form(s), then add it again (make sure all properties are the same like name, index...) and save project.

  22. #22

    Thread Starter
    Member
    Join Date
    Feb 2008
    Posts
    49

    Re: Components do not load

    Name:  vb6-7.jpg
Views: 7704
Size:  358.5 KBName:  vb6-8.jpg
Views: 7742
Size:  239.9 KB

  23. #23

    Thread Starter
    Member
    Join Date
    Feb 2008
    Posts
    49

    Re: Components do not load

    Well, it is still a mystery. May I remind you that it all started after the chrome web browser was installed which made itself the default browser. I uninstalled Chrome and made Internet Exporer10 the default browser again. I then had to use a Microsoft Fixit program to be able to make links in emails work. I don't know 100 % for sure that this is causing the problem but it could be.

    In meantime I have done what you said. comdlg32.ocx registered successfully but it could not be loaded. see screen shots . I tried to register thecomdlg32.dll the same way but that did not succeed. .... entry point DllRegisterServer was not found. Maybe that gives a clue.

  24. #24
    PowerPoster
    Join Date
    Jun 2001
    Location
    Trafalgar, IN
    Posts
    4,141

    Re: Components do not load

    Is this problem specific to this project or do you have the same problem if you start a new project and try adding components to it?

  25. #25
    PowerPoster
    Join Date
    Aug 2011
    Location
    B.C., Canada
    Posts
    2,887

    Re: Components do not load

    I think maybe comdlg32.ocx was replaced when you installed IE 10 or Chrome. I have both installed and no problem on my windows 7.

    Please see attached picture and look I open cmd.exe from c:\windows\syswow64\cmd.exe and not c:\windows\system32\cmd.exe.
    Name:  4.jpg
Views: 10155
Size:  177.1 KB

    First try unregistering the comdlg32.ocx file, using the command prompt (run as administrator) using

    Name:  5.jpg
Views: 7622
Size:  52.4 KB
    Code:
    cd..
    cd syswow64
    regsvr32.exe /u C:\Windows\SysWOW64\comdlg32.ocx
    regsvr32.exe /u C:\Windows\System32\comdlg32.ocx

    Now do the same with c:\windows\system32\cmd.exe.
    Open it (right click run as administrator)
    Once opened as administrator, make sure the cmd prompt is now in c:\windows\system32
    and unregister like above but instead of syswow64 you wil use the system32 regsvr32.
    Code:
    regsvr32.exe /u C:\Windows\SysWOW64\comdlg32.ocx
    regsvr32.exe /u C:\Windows\System32\comdlg32.ocx
    Ok once everything is unregistered, now open the cmd.exe from syswow64, register the file in there
    Code:
    cd..
    cd syswow64
    regsvr32.exe C:\Windows\SysWOW64\comdlg32.ocx
    Now close VB6.EXE if opened.
    Name:  1.jpg
Views: 7754
Size:  143.9 KB
    Name:  2.jpg
Views: 7689
Size:  119.9 KB

    Open VB6.EXE now go to component list and browse to the syswow64\comdlg32.ocx, apply, ok.
    See if this works, if not do the system32 one, and try.
    Follow same instructions but instead of syswow64 you will use the system32 cmd.exe and regsvr32.exe.

    Alright if ANY of this works,
    Download http://activex.microsoft.com/controls/vb6/comdlg32.cab
    Extract it anywhere and right click on the .ini file and click install.

    This did not work? Take the comdlg32.ocx from the link I gave you and put it in the folder of your application (or project) that is not working. Open cmd.exe (from syswow64) but make sure your run as administrator, and register it.
    Code:
    regsvr32 C:\Users\Me\Desktop\MyProjectPath\comdlg32.ocx
    Now try it. Make sure you followed my picture where it shows you how to run VB6.EXE as administrator from the properties, this way it will always run as administrator.
    Last edited by Max187Boucher; May 26th, 2013 at 10:45 AM.

  26. #26

    Thread Starter
    Member
    Join Date
    Feb 2008
    Posts
    49

    Re: Components do not load

    Name:  vb6-10.jpg
Views: 7723
Size:  362.7 KB

  27. #27

    Thread Starter
    Member
    Join Date
    Feb 2008
    Posts
    49

    Re: Components do not load

    WOW. Finally something worked I used the same procedure for the msMapi32.ocx file. Thanks so much.

    Now I need a procedure that does this for all components

    I will look into the bat file that was suggested a little while ago.

    Peter

  28. #28
    PowerPoster
    Join Date
    Aug 2011
    Location
    B.C., Canada
    Posts
    2,887

    Re: Components do not load

    What did you do exactly so users in the future know exactly what to do if it does happen to them!
    I hope I did not confuse you to much

  29. #29

    Thread Starter
    Member
    Join Date
    Feb 2008
    Posts
    49

    Re: Components do not load

    I have started a new thread because this one has become so large. I am sure you will find it.

    Thanks again for your help.

    Peter Schoots

  30. #30
    PowerPoster
    Join Date
    Aug 2011
    Location
    B.C., Canada
    Posts
    2,887

    Re: Components do not load

    For final answer go to http://www.vbforums.com/showthread.p...oad-conclusion
    Hope this can help people that has this problem after installing Internet Explorer 10 or Chrome or any other problems with components not loading!

  31. #31
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: Components do not load

    @ Peter Schoots,

    In regards to the thread Max refers to there is no need to create a new thread to talk about the same or a similar problem you are having! That as long as it is your thread, don't go hi-jacking other peoples threads.
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

Tags for this Thread

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