dcsimg
Results 1 to 5 of 5

Thread: ActiveX control update

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2012
    Posts
    400

    ActiveX control update

    To update ActiveX control, is it only thing I should do?
    For example.

    I made a ActiveX control(.ocx) and copied it to the C:\Windows\System32 folder(in 32bit OS PC) and registered it to the registry using regsvr32.exe.
    And I used that ActiveX from the client code.
    And then, for some reason, I modified that ActiveX control's code, compiled it.
    I this case, may I just replace existing .ocx file? is that all?
    Otherwise, should I unregister and register that .ocx file?

  2. #2
    Frenzied Member
    Join Date
    Feb 2017
    Posts
    1,061

    Re: ActiveX control update

    Quote Originally Posted by jdy0803 View Post
    To update ActiveX control, is it only thing I should do?
    For example.

    I made a ActiveX control(.ocx) and copied it to the C:\Windows\System32 folder(in 32bit OS PC) and registered it to the registry using regsvr32.exe.
    And I used that ActiveX from the client code.
    And then, for some reason, I modified that ActiveX control's code, compiled it.
    I this case, may I just replace existing .ocx file? is that all?
    Otherwise, should I unregister and register that .ocx file?
    Yes, you need to unregister the old and register the new.
    But you don't need to copy to the ocx to C:\Windows\System32 folder in the machine you develop.
    And in the machine you develop, VB6 automatically register the new ocx every time you compile any new version.
    vbExtra: Print preview for VB6, print FlexGrids and more.
    MSDN online for VB6, Language reference.

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2012
    Posts
    400

    Re: ActiveX control update

    I don't understand why I should unregister the old and register the new.
    If once I register, that information is in the registry.
    Why should I do it before/after replace .ocx file?

  4. #4
    Frenzied Member
    Join Date
    Feb 2017
    Posts
    1,061

    Re: ActiveX control update

    Quote Originally Posted by jdy0803 View Post
    I don't understand why I should unregister the old and register the new.
    If once I register, that information is in the registry.
    Why should I do it before/after replace .ocx file?
    Most of the times just registering should be OK.
    But when there is a version change may be both versions stay registered in the registry.

    May be someone else knows and can explain the issue better.
    I try to unregister the old version first if I have the chance. Just to avoid any problem.

    Also when the OCX file location (path) changes, I try to unregister the first location first.
    Perhaps someone knows and can clarify what's really necessary and what it ins't.
    What I can say: if you unregister old versions you'll be always OK.

    Anyway from time to time I run a registry cleaner utility to erase all the things that are registered but not present on the disk.
    vbExtra: Print preview for VB6, print FlexGrids and more.
    MSDN online for VB6, Language reference.

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2012
    Posts
    400

    Re: ActiveX control update

    if you unregister old versions you'll be always OK
    I got it.
    It seems to be safe way that I unregister existingocx file.

    Thanks Eduardo!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width