How can I tell VB always createing the same GUID for the same OCX Project

My ActiveX control contains an other ActiveX control. When I compile this
second control, a new GUID will be created. My problem is that VB says the
project which contains the second ActiveX control could not be loaded
correctly. I assume  the problem is the GUID of the second control, because the path of the new OCX is the same as the old on. Although in the menu
Projekt > Components are several OCX´es with the same name.
Could you give me a tip how to tell VB compiling the new OCX in the same way as the old one.
_alphaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

p_biggelaarCommented:
There is one way to ensure that your newly compiled control is compatible with the previous version. This is by setting the version compatibility to binary.

You can find this setting on the components tab (for the second control) of the project properties sheet.

Bare in mind that VB can only maintain compatibility with a previous version when you:
- don't change the existing methodcall's (i.e. if you decide that an existing method needs another parameter: forget compatibility, on the other hand it's perfectly okay to change something in the code of the method itself)

- don't delete existing properties/methods/events

- you can add anything you like.

With respect to the first note: it's common practice for released ocx or dll that when a method call has to be changed to reflect new functionality, you will find a new method implementing the new call, while the existing method remains unchanged. This is purely to preserve compatiblity.

If you do this and bare the restrictions in mind, you shouldn't have any further problems!

Good luck!
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
p_biggelaarCommented:
Oh, forgot to mention:
Please make sure that the first time you compile the control using binary compatiblity you'll add the correct component/reference to other project.

Just in case: project properties can be found in the menu (project -> <projectname> properties) or by rightclicking the project in the project explorer.

Bye
0
rovermCommented:
Check the 'Upgrade ActiveX controls' in your Project Properties before compiling.
Also check the compability setting as p biggelaar suggested !
0
_alphaAuthor Commented:
Thank you,

now I can compile a new version and use it without problems
0
p_biggelaarCommented:
You're welcome.

See ya
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.