Results 1 to 13 of 13

Thread: Can't add ocx into vb6 form

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Oct 2003
    Location
    México
    Posts
    20

    Question Can't add ocx into vb6 form

    Hi all friends

    I have problems trying to add an ocx component into a vb6 form, i can add it from menu Project --> Components, but when a i drop-drag from toolbox it gives me the next error message (in spanish but i'll translate it) :

    The component MyOCX or one of its depending files it's not registered correctly: a file it's lacking or a file it's not valid


    I've tried the next:

    -Unregister/register the last download version from different paths
    -Delete all NameOfOcx in regedit and after unregister/regiser the ocx.


    Does someone have any idea what's happenign??

    I'll appreciate your help.

  2. #2
    PowerPoster Dave Sell's Avatar
    Join Date
    Mar 2004
    Location
    /dev/null
    Posts
    2,961

    Re: Can't add ocx into vb6 form

    Who created this OCX?
    Nobody knows what software they want until after you've delivered what they originally asked for.

    Don't solve problems which don't exist.

    "If I had eight hours to cut down a tree, I'd spend six hours sharpening my axe." --- Abraham Lincoln (1809-1865)

    2 idiots don't make a genius.

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Oct 2003
    Location
    México
    Posts
    20

    Question Re: Can't add ocx into vb6 form

    Dave,

    Someone in the Company where i work (I'll investigate it althougt it's difficult to know)

    Also i did:

    -Uninstall/Install VB6
    -Install VB6SP5
    -Delete CLS-ID info in regedit generated in th e VB project file linked to the OCX by VB6


    ThanX!

  4. #4
    PowerPoster Dave Sell's Avatar
    Join Date
    Mar 2004
    Location
    /dev/null
    Posts
    2,961

    Re: Can't add ocx into vb6 form

    Have them create a setup.exe with their P&D Wizard and run it on the problematic machine.
    Nobody knows what software they want until after you've delivered what they originally asked for.

    Don't solve problems which don't exist.

    "If I had eight hours to cut down a tree, I'd spend six hours sharpening my axe." --- Abraham Lincoln (1809-1865)

    2 idiots don't make a genius.

  5. #5
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Can't add ocx into vb6 form

    Quote Originally Posted by quetzalcoatl
    Hi all friends

    I have problems trying to add an ocx component into a vb6 form, i can add it from menu Project --> Components, but when a i drop-drag from toolbox it gives me the next error message (in spanish but i'll translate it) :

    The component MyOCX or one of its depending files it's not registered correctly: a file it's lacking or a file it's not valid


    I've tried the next:

    -Unregister/register the last download version from different paths
    -Delete all NameOfOcx in regedit and after unregister/regiser the ocx.


    Does someone have any idea what's happenign??

    I'll appreciate your help.
    It may be one of those OCX files that has an associated .Dll file (I've seen before), and that could be the file that it is missing.

    To me, the best way to solve this issue is track down the person that wrote it. You said that it was someone in your company. If this is the case, then your company owns the source code to this OCX, and therefore, should have it available for you (or any other programmer in your company) to look at. Have you asked about this?

  6. #6
    PowerPoster Dave Sell's Avatar
    Join Date
    Mar 2004
    Location
    /dev/null
    Posts
    2,961

    Re: Can't add ocx into vb6 form

    If it's included in the project, then the P&D Wizard will offer to include it with the setup.exe/cab file.
    Nobody knows what software they want until after you've delivered what they originally asked for.

    Don't solve problems which don't exist.

    "If I had eight hours to cut down a tree, I'd spend six hours sharpening my axe." --- Abraham Lincoln (1809-1865)

    2 idiots don't make a genius.

  7. #7
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Can't add ocx into vb6 form

    Quote Originally Posted by Dave Sell
    If it's included in the project, then the P&D Wizard will offer to include it with the setup.exe/cab file.
    Quote Originally Posted by quetzalcoatl
    I have problems trying to add an ocx component into a vb6 form, i can add it from menu Project --> Components, but when a i drop-drag from toolbox it gives me the next error message
    I thought the original problem was that he couldn't load it into a project. However, Dave, you bring up an interesting point which leads to a question.

    quetzalcoatl: Does the problem you are having deal with loading this component into a new project? If so, are there existing projects in which it does load properly?

  8. #8
    PowerPoster Dave Sell's Avatar
    Join Date
    Mar 2004
    Location
    /dev/null
    Posts
    2,961

    Re: Can't add ocx into vb6 form

    Er, when I say "included in a project," I do of course refer to the act of adding the reference through the IDE. DLL library refernces loosely in modules may not be included in the setup.exe/cab. I have never checked.
    Nobody knows what software they want until after you've delivered what they originally asked for.

    Don't solve problems which don't exist.

    "If I had eight hours to cut down a tree, I'd spend six hours sharpening my axe." --- Abraham Lincoln (1809-1865)

    2 idiots don't make a genius.

  9. #9
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Can't add ocx into vb6 form

    Quote Originally Posted by Dave Sell
    DLL library refernces loosely in modules may not be included in the setup.exe/cab. I have never checked.
    If you reference an external .Dll then said .Dll needs to be distributed with your project.

  10. #10
    PowerPoster Dave Sell's Avatar
    Join Date
    Mar 2004
    Location
    /dev/null
    Posts
    2,961

    Re: Can't add ocx into vb6 form

    Quote Originally Posted by Hack
    If you reference an external .Dll then said .Dll needs to be distributed with your project.
    That may be but I was referring to the capabilities of the P&D Wizard to do your packaging for you.

    As pointed out by Hack, you may need to take extra steps for "loosely" linked DLLs.
    Nobody knows what software they want until after you've delivered what they originally asked for.

    Don't solve problems which don't exist.

    "If I had eight hours to cut down a tree, I'd spend six hours sharpening my axe." --- Abraham Lincoln (1809-1865)

    2 idiots don't make a genius.

  11. #11

    Thread Starter
    Junior Member
    Join Date
    Oct 2003
    Location
    México
    Posts
    20

    Re: Can't add ocx into vb6 form

    Hi again all friends

    ThanX for all your posts,


    Hack

    It happens either in a new project or in a project which they gave to me, in that project is where i'm trying to load that OCX.


    It is not a setup, it is a VB6 project which was given to me, so they told me install those DLL's in that folder and those OCX's in that folder and you will be able to use,debug the VB6 project, i've uninstalled/installed all those OCX's and DLL's but is the same thing, i'm trying to get the code of that OCX to see if it is referencing to some DLL, but it's a little difficult because it's a little old OCX and the author doesn´t work here anymore.



    ThanX!

  12. #12
    PowerPoster Dave Sell's Avatar
    Join Date
    Mar 2004
    Location
    /dev/null
    Posts
    2,961

    Re: Can't add ocx into vb6 form

    The MyOCX had to have come from a project. That is the project that needs to have a setup.exe/cab created. Only then will you be able to use it.
    Nobody knows what software they want until after you've delivered what they originally asked for.

    Don't solve problems which don't exist.

    "If I had eight hours to cut down a tree, I'd spend six hours sharpening my axe." --- Abraham Lincoln (1809-1865)

    2 idiots don't make a genius.

  13. #13
    Frenzied Member yrwyddfa's Avatar
    Join Date
    Aug 2001
    Location
    England
    Posts
    1,253

    Re: Can't add ocx into vb6 form

    If the OCX is VB6 authored then make sure the colleague who compiled it had binary compatibility set to ON.

    If he hasn't then you will have a nasty problem of 'interface forwarding' mainly because VB6 will try to fix your problem and fail miserably.

    If this is the problem you will need to get some form of registry cleaner, and then reinstall the component using the methods described above.
    "As far as the laws of mathematics refer to reality, they are not certain; and as far as they are certain, they do not refer to reality." - Albert Einstein

    It's turtles! And it's all the way down

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