Solved

Updating Registry after Change to OCX

Posted on 1998-10-20
10
321 Views
Last Modified: 2012-06-27
I am trying to create my own ActiveX control.  After I create it, I make the ocx file.  Then I created a simple exe to use that control.  AS long as the exe gets recompliled the ocx gets registered.  But lets say I have the program in place already and I need to make a change to the control.  So I make the change and create a new OCX.  Now when I run the program it says that the OCX is not correctly registered.  How can I update the registry without having to recompile the program?  Or is there a better way of going about having a component that can be updated on the fly?

Thanks
Mark
0
Comment
Question by:mgerschu
  • 6
  • 4
10 Comments
 
LVL 2

Accepted Solution

by:
BergJC earned 110 total points
Comment Utility
Go to Start/Run menu and use the command regsvr32.exe controlname.ocx
0
 
LVL 2

Expert Comment

by:BergJC
Comment Utility
By "controlname.ocx", I mean the name of the OCX you wish to register.
0
 

Author Comment

by:mgerschu
Comment Utility
I tried that and it still gave me the warning that myactx.ocx is not correctly registered or missing.

Well it is not missing and it did register it.

Is there any better way to have a part of a program that can be updated whenever needed without rebuilding the program?
0
 
LVL 2

Expert Comment

by:BergJC
Comment Utility
Have you tried specifying the directory when you register your OCX? Ex. "regsvr32.exe c:\vb\myactx.ocx"

Other than regsvr32, I don't know of any other way to update an ActiveX control without recompiling the program.
0
 

Author Comment

by:mgerschu
Comment Utility
Yes I did include the path.  The only thing I can figure is to use a dll then.  The only problem with that is I can not find a good tutorial on how to use and build dll's.  Let me try to explain the problem.  I am using crystal reports to print labels.  If the report changes a little bit, I want to be able to change it and then distribute the change to all the locations.  On my control, I will have problably at least 8 reports and a couple data controls.  Can that be done using a dll or I am going to be stuck redistributing the application every time a modification is made.
0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
LVL 2

Expert Comment

by:BergJC
Comment Utility
Are you only changing the reports themselves, or the actual program? If you are only changing the report, all you need to distribute is the new .RPT file. If you are actually changing the databases associated with the reports, that could get a little more complicated.
0
 

Author Comment

by:mgerschu
Comment Utility
It would probably only be a change in the report.  But if you use the Report's activeX control you don't have to have the report ditributed with the program as long as I was reading it correctly.  If I don't use the activeX control then I have a chance of the rpt file being lost.  I would like to have it imbedded if possible.
0
 
LVL 2

Expert Comment

by:BergJC
Comment Utility
You are right, with the ActiveX control you can bind a report to a data control and then you don't need the rpt files. I don't think a dll will help you either. The real issue is why you can't register your OCX. Do you have regclean.exe? If so, have you run that? Sometimes on developers machines you need to run this quite often. I'd recommend running that (if you haven't) and then use regsvr32.exe again to re-register your OCX. You might consider using a batch program to update this OCX on the users machine.
0
 

Author Comment

by:mgerschu
Comment Utility
Where can I get regclean?
0
 
LVL 2

Expert Comment

by:BergJC
Comment Utility
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
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…
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…
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…

771 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

12 Experts available now in Live!

Get 1:1 Help Now