Solved

Updating Registry after Change to OCX

Posted on 1998-10-20
10
322 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
ID: 1440728
Go to Start/Run menu and use the command regsvr32.exe controlname.ocx
0
 
LVL 2

Expert Comment

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

Author Comment

by:mgerschu
ID: 1440730
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
ID: 1440731
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
ID: 1440732
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 2

Expert Comment

by:BergJC
ID: 1440733
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
ID: 1440734
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
ID: 1440735
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
ID: 1440736
Where can I get regclean?
0
 
LVL 2

Expert Comment

by:BergJC
ID: 1440737
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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…
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…

895 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

11 Experts available now in Live!

Get 1:1 Help Now