Solved

still relating to the ocx.

Posted on 1999-01-11
8
200 Views
Last Modified: 2010-05-03
I wrote a group: project1 - the ActiveX control and project2 - the exe for testing the ActiveX. It was running fine. So, I make the .ocx file in the same folder as the group.

After that I changed something in project1 - the ActiveX. Then I closed project1 and open preject2 - the test exe preject. I found it still used the ocx instead of the updated project1 and there where two ActiveX controls in the tool box.

What I should do?
0
Comment
Question by:johnwood
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
  • 2
8 Comments
 
LVL 10

Accepted Solution

by:
caraf_g earned 80 total points
ID: 1455326
You can avoid this happening by setting Binary Compatibility in the Version Compatibility frame on the Component tab of your Project Properties (in project 1)

Alternatively, before each re-compile, unregister the current version by typing in

RegSvr32 -u Project1.ocx (or whatever you compiled it as)

in a command prompt. But the disadvantage of that is that every time you then re-open Project2 it loses the reference to project1 and you'll have to find the ocx again




0
 

Author Comment

by:johnwood
ID: 1455327
Hi caraf_g

Thank you. I have increase the points so that you may give more help :-)

1. In my case, no re-compile, only open project2. Is your suggestion working in my case?
2. What advantage by the default setting - project compatibility? Why not always use Binary Compatibility? When we use "no compatibility"?!
3. What "Binary" means here?
0
 

Author Comment

by:johnwood
ID: 1455328
Adjusted points to 80
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 3

Expert Comment

by:cognition
ID: 1455329
Why not just open both projects at the same time, then you can edit both. You can do this with VB5 and VB6. Choose add project rather than open project.
0
 
LVL 10

Expert Comment

by:caraf_g
ID: 1455330
You can avoid having to set compatibility if you use a project group.

This can be achieved as follows:

Open project2.vbp (the executable)

Open project1.vbp (the OCX) by choosing File - Add Project from the menu.

This automatically creates a project group containing project1 and project2, and makes sure that project2 (the executable) is the one that is started when the project is run.

Then, never Make the OCX until you're finished and happy that everything works.

When you close VB, you'll be prompted to save the project group as a .vbg file - after you've done this, always open the .vbg file, never the individual projects.

Hope this helps, and good luck!
0
 

Author Comment

by:johnwood
ID: 1455331
Yes caraf_g. I always use group and didn't like to make ocx until I thought I can finish the job. However, after "finish", I found I needed to add something to the ActixeX control :-)

I have tried your suggestion (set binary compatibility) but fail to work. Now the problem still there: the exe project still uses the ocx instead of the updated ActiveX project :-(
0
 

Author Comment

by:johnwood
ID: 1455332
To cognition:
 
 > Why not just open both projects at the same time,

Yes, I tried open them at the sam time, but the exe project always use the control from the old ocx instesd from the upddated AxtiveX project!
0
 
LVL 3

Expert Comment

by:cognition
ID: 1455333
Reference the project and not the control, in Project|components.

You can also delete the control. ALthough you should unregister it first.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question