Solved

Executable cannot upgrade to new ocx version

Posted on 1999-01-24
3
160 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 350 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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 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…
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…

705 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now