Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

still relating to the ocx.

Posted on 1999-01-11
8
Medium Priority
?
221 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 160 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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

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!

Question has a verified solution.

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

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

636 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