?
Solved

Updating Registry after Change to OCX

Posted on 1998-10-20
10
Medium Priority
?
327 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone 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 …
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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
Course of the Month13 days, 6 hours left to enroll

801 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