Results 1 to 6 of 6

Thread: ActiveX Problem

  1. #1
    Guest

    Unhappy

    I'm creating a new ActiveX control in VB6 Enterprise. The ocx file compiles fine when I choose "Make myControl.ocx", but it seems to get a new class ID (that long string of numbers and letters) every time. As a result, my applications don't recognize a new version of the control. What's going on?


  2. #2
    Hyperactive Member
    Join Date
    Jun 2000
    Location
    Auckland, NZ
    Posts
    411

    Are you changing the project name?

    That is how I deliberately change the prog id.

    Check out this link which is a good essay about the prog id's...

    http://www.vbaccelerator.com/progid.htm

    Cheers
    PAul Lewis


  3. #3
    Guest
    You have to set the program to have binary compatiblity with the last ocx you created.

    If you go to your menu

    Project->project Properties(at bottom of menu)
    Then click on the Component tab, the bottom box handles component compatibility. Select the binary compatiblity and choose it to be compatible with the .ocx you are creating.

    Now, everytime you do a make it will have the same GUID.


  4. #4
    Guest
    You learn something new every day. Thanks gargamehl.

  5. #5
    Addicted Member
    Join Date
    Aug 1999
    Location
    Hamilton, New Zealand
    Posts
    137
    Be very careful when using binary compatibillty however.

    VB changes teh classID for a good reason.

    If you change the component too much, ie data types returned / passed to functions, you can cause your whole machine to crash

    If you aren't changing function prototypes etc though you shuold be fine

    Regards

    Matt Brown
    Hamilton, NZ
    VB6 C++ in Visual Studio 6sp4
    VB.net Beta 1

  6. #6
    Lively Member
    Join Date
    May 1999
    Location
    India
    Posts
    97
    Mate,
    I suggest u read up the article on Binary compatibility in MSDN before u go for it... especially if this is a Billable project It can cause a helluva lot of head aches at ALL teh wrong times....

    cheers
    Gaurav
    [email protected]
    " Programming today is a race between software-engineers striving to build bigger and
    better idiot-proof programs and the universe trying to produce bigger and better idiots.
    So far the universe is winning".
    :-)

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