?
Solved

After registering OCX, how to "tell" VB program to refresh the Control?

Posted on 2006-03-24
6
Medium Priority
?
275 Views
Last Modified: 2008-02-01
For example Calendar control using MSCAL.OCX
If I have two version of MSCAL.OCX ie 8.0 and 11.0
Version 11.0 is under
"C:\Program Files\Microsoft Office\OFFICE11\MSCAL.OCX"
Version 8.0 is under
"C:\WINDOWS\system32\MSCAL.OCX"

After I do a
regsvr32 /u "C:\Program Files\Microsoft Office\OFFICE11\MSCAL.OCX"
regsvr32 "C:\WINDOWS\system32\MSCAL.OCX"
(To unregister Version 11.0 and register Version 8.0)

Is there a systematic way to "tell" VB program to refresh the Control in order to reflect the updated version?
0
Comment
Question by:william007
6 Comments
 
LVL 22

Accepted Solution

by:
danaseaman earned 1600 total points
ID: 16283455
Not that I know of but if you close your project and reopen it you should get the control that is currently registered.
0
 
LVL 15

Expert Comment

by:Computron
ID: 16284225
You may be able to rename one of them, register it and have both at your disposal.
0
 
LVL 8

Expert Comment

by:Leo Eikelman
ID: 16284261
Why would you want to do this?  It is basically bad programming.  

Register all your components before starting the application.

Leo
0
Technology Partners: 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 3

Expert Comment

by:ptan218
ID: 16286428
#1, Close the Visual Studio
#2. Start your project again
#3. Go to the Project | Components
#4. Uncheck the Calendar Control
#5. Then click BROWSE to select your new MSCAL.OCX
0
 
LVL 8

Assisted Solution

by:Leo Eikelman
Leo Eikelman earned 400 total points
ID: 16288565
or... don't load your dll while the application is open (because it's a bad practice) and just open your application once your dll is loaded and use the newly loaded component.

Leo
0
 
LVL 9

Author Comment

by:william007
ID: 16289965
Thanks:-)
0

Featured Post

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!

Question has a verified solution.

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

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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 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…
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…
Suggested Courses

850 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