Run-time error '372 - MSCOMCTL.OCX in Windows 7-VBForums
Results 1 to 10 of 10

Thread: Run-time error '372 - MSCOMCTL.OCX in Windows 7

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jan 2017
    Posts
    16

    Run-time error '372 - MSCOMCTL.OCX in Windows 7

    Hello.

    In my program I used mscomctl.ocx control.
    In Windows 10 and Windows 8.1 works well
    But in Windows 7 I encounter the following error

    Code:
    * Run-time error '372':
    
    Failed to load control 'ImageList' from MSCOMCTL.OCX. Your version of MSCOMCTL.OCX may be outdated. Make sure you are using the version of the control that was provided with your application.
    
    I searched and I've tried a lot of different solutions, but the problem is not resolved

    please guide me
    Thanks

  2. #2
    PowerPoster
    Join Date
    Feb 2006
    Posts
    17,492

    Re: Run-time error '372 - MSCOMCTL.OCX in Windows 7

    See the recent thread:

    Issue with Running VB6 in Windows 7

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Jan 2017
    Posts
    16

    Re: Run-time error '372 - MSCOMCTL.OCX in Windows 7

    Quote Originally Posted by dilettante View Post
    Thanks
    But I did read this topic, but it was not true

  4. #4
    PowerPoster
    Join Date
    Feb 2006
    Posts
    17,492

    Re: Run-time error '372 - MSCOMCTL.OCX in Windows 7

    If at all possible run, don't walk to Windows 10. Windows 7 is on its last legs, has a number of issues of this kind, and Windows 10 is a moving train you need to jump aboard as soon as possible or face massive shock when you do.

    Within a month Microsoft is pushing out another large patch to Windows 10.

    Windows 10 isn't really even Windows 10 anymore. They maintain the fiction by having frozen the numbering but by rights Windows 12 is the current product, soon to become Windows 13. Of course they are all being called "Windows 10" now.

    Windows 7 is a suckers' game.

  5. #5
    PowerPoster
    Join Date
    Feb 2006
    Posts
    17,492

    Re: Run-time error '372 - MSCOMCTL.OCX in Windows 7

    What does the Object= line from your .VBP file have?

  6. #6
    PowerPoster
    Join Date
    Feb 2006
    Posts
    17,492

    Re: Run-time error '372 - MSCOMCTL.OCX in Windows 7

    It sounds like you have compiled a program against one type library but at runtime the machine has a version of the OCX that does not implement those interfaces.

    The "Windows 7 problem" is related to Office and IE patches to Windows 7 (SP1 only I think) that broke binary compatibility.

    Some install a MSCOMCTL.OCX that omits the version 2.0 interfaces. Others have both 2.0 and 2.1 interfaces implemented but broke the registration of the 2.0 interfaces.


    The only way to ensure your program always works may be to compile on a clean non-Win7 machine using the 2.0 interfaces, then package using a private assembly containing a "2.0 interface implementing" version of MSCOMCTL.OCX. Since VB6 was never enhanced with tools for doing this you need to make use of a 3rd party tool or possibly a tool from some later version of Visual Studio.

    The only other fix is to "fix" every Windows 7 machine you want to run on, and that might break something else on the machine like MS Office. Even if you do that, Windows Update may come along and undo your "fix."

  7. #7

    Thread Starter
    Junior Member
    Join Date
    Jan 2017
    Posts
    16

    Re: Run-time error '372 - MSCOMCTL.OCX in Windows 7

    I found the solution.

    The reason for this failure was because of the size 16 x 16 images
    Size must be 32 x 32
    Solved

  8. #8

    Thread Starter
    Junior Member
    Join Date
    Jan 2017
    Posts
    16

    Re: Run-time error '372 - MSCOMCTL.OCX in Windows 7

    dilettante's very grateful for the answer that you've sent.

    I tried many ways like ActiveX update etc.


    But the solution was to change the size of icons on the image list

    Thanks

  9. #9
    PowerPoster
    Join Date
    Feb 2006
    Posts
    17,492

    Re: Run-time error '372 - MSCOMCTL.OCX in Windows 7

    Well that seems bizarre, but you didn't give us much to go on but a very generic problem description. At least you resolved your problem.

    But I don't see how icon size could possibly result in that runtime exception.

  10. #10

    Thread Starter
    Junior Member
    Join Date
    Jan 2017
    Posts
    16

    Re: Run-time error '372 - MSCOMCTL.OCX in Windows 7

    Quote Originally Posted by dilettante View Post
    Well that seems bizarre, but you didn't give us much to go on but a very generic problem description. At least you resolved your problem.

    But I don't see how icon size could possibly result in that runtime exception.
    Exactly ... I have never thought that the problem of the issue.
    But step by step I noticed was the Czech application loading.

    It's a story about a well things had said loading images
    I was just testing for the exam!

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.