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

Thread: "Component 'MSHFLXGD.OCX' or one of its dependencies not correctly registered

  1. #1
    Join Date
    Apr 2009
    Posts
    6

    "Component 'MSHFLXGD.OCX' or one of its dependencies not correctly registered

    Hi to all

    Please help with this problem,
    When i tried to run the applciation to other machine i got this error.
    "Component 'MSHFLXGD.OCX' or one of its dependencies not correctly registered : a file is missing or invalid

    ANy idea please

    Thanks
    PAul

  2. #2
    Join Date
    Aug 2003
    Location
    Sydney, Australia
    Posts
    1,872

    Re: "Component 'MSHFLXGD.OCX' or one of its dependencies not correctly registered

    This means either that the control (MshFlxgd.ocx) is not on your machine, or it is not registered

    To be sure, try and find a copy of MSHFLXGD.OCX, copy it to c:\Windows\System32\, then register it

    To Register it

    Click Start - Click Run - Enter "regsvr32 mshflxgd.ocx" - Click OK

    Or in a Batch File

    Code:
    XCOPY c:\mshflxgd.ocx c:\Windows\System32
    regsvr32 mshflxgd.ocx
    Find the control be doing a search on your C: Hard Disk

    If you cant find it - Google

    If you still cant find it, I can email you a copy

  3. #3
    Join Date
    Jul 2006
    Location
    Germany
    Posts
    3,725

    Re: "Component 'MSHFLXGD.OCX' or one of its dependencies not correctly registered

    This seems to become an issue recently.

    To make an application run on another machine you must create an install package using the "Package and Deployment Wizard" which comes with VB
    It will search your code for dependancies, like external controls as MSHFlexGrid and others, and pack these elements into the setup pack.
    You run the setup on the target machine and it makes sure that each missing element will be installed on the target machine. After that your program will run perfectly.

  4. #4
    Join Date
    Apr 2009
    Posts
    6

    Re: "Component 'MSHFLXGD.OCX' or one of its dependencies not correctly registered

    Thanks you so much for your help.. will try all these ideas

  5. #5
    DataMiser is offline Super Moderator Power Poster
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,305

    Re: "Component 'MSHFLXGD.OCX' or one of its dependencies not correctly registered

    Quote Originally Posted by George1111 View Post
    This means either that the control (MshFlxgd.ocx) is not on your machine, or it is not registered

    To be sure, try and find a copy of MSHFLXGD.OCX, copy it to c:\Windows\System32\, then register it

    To Register it

    Click Start - Click Run - Enter "regsvr32 mshflxgd.ocx" - Click OK

    Or in a Batch File

    Code:
    XCOPY c:\mshflxgd.ocx c:\Windows\System32
    regsvr32 mshflxgd.ocx
    Find the control be doing a search on your C: Hard Disk

    If you cant find it - Google

    If you still cant find it, I can email you a copy
    This will work of course but this also assumes that this is the only control that is going to be an issue. If there are other controls used by the program which are also missing then the program will exit with a different message next time and the time after that and so it will continue until all controls are properly registered on the system. And of coruse the program will still not run on the next persons system without doing this same type of thing.

    If a programer delivered such a program to me more than once he would not work for me any longer.

    Use the proper setup procedure either the package and deployment wizard or a 3rd party install tool of your choice to make sure that the software works the first time for everyone who needs to use it.

  6. #6
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: "Component 'MSHFLXGD.OCX' or one of its dependencies not correctly registered

    Just download the VB6 Runtime Library for that machine. Otherwise, nobody else registered it in the past on that machine.
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

Posting Permissions

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


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)