• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 228
  • Last Modified:

still relating to the ocx.

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
johnwood
Asked:
johnwood
  • 4
  • 2
  • 2
1 Solution
 
caraf_gCommented:
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
 
johnwoodAuthor Commented:
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
 
johnwoodAuthor Commented:
Adjusted points to 80
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
cognitionCommented:
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
 
caraf_gCommented:
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
 
johnwoodAuthor Commented:
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
 
johnwoodAuthor Commented:
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
 
cognitionCommented:
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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 4
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now