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
Solved

Executable cannot upgrade to new ocx version

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

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…

829 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