Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Remove entries in the components list in VB6.

Status
Not open for further replies.

zggs90

Programmer
Sep 3, 2001
58
0
0
GB
I have been creating and registering some user controls. I now need to remove the reference to these controls from the components list window in VB6 as they are no longer valid. How can I do this?

Many thanks
 
use regsvr32 /u on the component that you wish not to be there.
 
Many thanks I have tried that but I seem to have two copies of the component in the list and using regsvr only removes one. Any other ideas?
 
When you click on it in the components list it gives you the location of where it is registered to. have you looked at this? You will want to unregister it from both locations, not just one.

 
I managed to finally remove the offending item in the list by renaming the OCX file and then doing a registry cleanup and the item disappeared.

Anyway thanks for your help.
 
<You will want to unregister it from both locations, not just one.

You can't register two copies of the same ocx or dll file twice, since they would both attempt to register the same classids. The registry goes by classid, not by file location.

Bob
 
>>since they would both attempt to register the same classids

However, there could have been two separate copies because chances are good that there were compatibility issues between then, which is what I had in mind, thus would allow the two copies to be registered to different locations.
 
This is giving me flashbacks of a nightmare I had last summer.

thread222-1073672


-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
<However, there could have been two separate copies

Ok, I see. If you create them yourself, and don't select binary compatibility before compiling, you'll get a different classid every time you compile. Then you could indeed have multiple registrations of the same file, given that each registration pointed to a different file.

<I seem to have two copies of the component in the list and using regsvr only removes one.

Just find the other file that's been registered. There IS a one to one correspondence between files and registry entries. If "using regsvr" only removes one, then you have to use regsvr on the other one, too. Go find the other file that's been registered with the same component name, and unregister it, too.

Bob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top