Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Updating Registry after Change to OCX

Posted on 1998-10-20
10
Medium Priority
?
330 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
[X]
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
  • 6
  • 4
10 Comments
 
LVL 2

Accepted Solution

by:
BergJC earned 440 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
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.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

604 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