Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Executable cannot upgrade to new ocx version

Posted on 1999-01-24
3
Medium Priority
?
174 Views
Last Modified: 2013-12-26
We have a large executable in the company (about 6MB) and I tried to take some of the new code outside to external object libraries. the problem is that the tests we conduct sometimes need an upgrade of the ocx when we discover a bug or need an additional feature. The problem is that no matter what compatibility settings have I tried to put, and although I tested it with another compilation only (with no changes what so ever from the previous compilation of the ocx) the IDE sees the ocx as a new version, and the executable won't accept it as a compatible component.
Correct me plaese if I have misundertood something on the way, but I think there should be a possibility to upgrade the controls without having to re-compile the executable each time.

More points are waiting for the answer I need.
0
Comment
Question by:zivf
  • 2
3 Comments
 
LVL 4

Accepted Solution

by:
idcanada earned 1400 total points
ID: 1489915

The answer you need may not be a happy one, however, in such cases,
I would put every possible set back on my side.

1 DL VB Service Pack 2

2 Make sure the EXE does not depend on old Properties, Subs or Functions
that you have depricated in the newer version. (Might be your case)
Your EXE will keep its prior working version.

3 Set Binary Compability, (To keep same GUID) and build / make the OCX file.
Now, Rebuild the EXE.
Make sure EXE is useing the newer OCX file. (Check References or Components)

4 Of course, all this is better manageable if you have the OCX & EXE projects in a
Visual Basic Project Group.

5 If all fails, this solution will work, however quite dramatic.
Open EXE Project File with Notepad, manually remove your OCX file reference and Save.
Open your Project with VB, loads of errors, but not that bad since your OCX file now
becomes a PictureBox with the name you gave it.
Manually insert your OCX threw the components dialog and bowse threw each
form that had your control and add it again.
No code has changed, and none will if you take the name from the picture box that was created instead of your control.


Well, best of luck lad.

If you have tried these steps and still you do not get the result you are looking for,
try building a small sample with that control and test the upgrade.
(Instead of working with the 6mg EXE).
If you simply can not, I would remake the OCX under a different name.


0
 
LVL 1

Author Comment

by:zivf
ID: 1489916
I need to check this thing out. The reason I posted the question to experts-exchange was because I could not find any answer no matter what combination I tried. Whenever I will try + succeed you'll get your points and even some more I have.
Until then anyone that wants is invited to leave his/her comments here.
0
 
LVL 1

Author Comment

by:zivf
ID: 1489917
Thanks a lot! I came to understand that the key to the whole is the binary compatibility setting.
I was very close to give-up the whole component thing, from the desperation I been to.
Thanks again.
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

916 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