We help IT Professionals succeed at work.

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

william007
william007 asked
on
Medium Priority
340 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?
Comment
Watch Question

Dana Seaman (danaseaman)
Commented:
Not that I know of but if you close your project and reopen it you should get the control that is currently registered.

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
You may be able to rename one of them, register it and have both at your disposal.
Leo EikelmanDirector, IT and Business Development

Commented:
Why would you want to do this?  It is basically bad programming.  

Register all your components before starting the application.

Leo

Commented:
#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
Leo EikelmanDirector, IT and Business Development
Commented:
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

Author

Commented:
Thanks:-)
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.