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

Updating Registry after Change to OCX

Posted on 1998-10-20
10
324 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
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…

839 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