Remove a control

Hi,
in the app i'm writing i've used a trial activex control.Now the trial period has expired and this control is no longer needed.
Is it possible to completely remove ir from the application:i mean,e.g.,remove it from the available controls window (the one which contains edit box,list box etc...,sorry but i don't know its right name!)
[360 byte] By [Fraben] at [2007-11-19 19:41:38]
# 1 Re: Remove a control
You don't have to do that. Simply make your control to fail at creation time after the evaluation period. Don't make the host app crash, just make sure your control does nothing. You can print some text instead: "Evaluation period finished. Show me the money." or something. :D
PadexArt at 2007-11-10 23:43:09 >
# 2 Re: Remove a control
Thanks.But would it be so hard to do such a thing?I'm using a similar control,and i'm encountering problems...maybe caused by the old control..and i would like to remove it
Fraben at 2007-11-10 23:44:09 >
# 3 Re: Remove a control
If you're using Visual Studio 6.0, the information for the control is embedded in the .dsw file. You should notice the guid for the control. If you remove it (carefully), it should remove it from the project. NOTE: Since this needs to be done manually, it is recommended that you make a back up copy of the .dsw file.
Mike Harnad at 2007-11-10 23:45:13 >
# 4 Re: Remove a control
My bad. I haven' paid attention to the question. Mike's right, you need to manually change your dsp and probabbly the resource file as well.
PadexArt at 2007-11-10 23:46:07 >
# 5 Re: Remove a control
No problem PadexArt,you all are helping me so much,and i really appreciate!

Mike's right, you need to manually change your dsp and probabbly the resource file as well.
What have i got to edit?the dsp or the dsw?or both?
Fraben at 2007-11-10 23:47:11 >
# 6 Re: Remove a control
The .dsw contains the control reference. You'll also need to remove the control from any dialog resource, and, delete any wrapper class(es) that provide access to the control.
Mike Harnad at 2007-11-10 23:48:10 >
# 7 Re: Remove a control
The .dsw contains the control reference. You'll also need to remove the control from any dialog resource, and, delete any wrapper class(es) that provide access to the control.

No, the DSW file does not contain refferences to the controls used in a project.

The DSP file contains refferences to the implementation files of the wrapper classes generated for the controls if any.

The resource file(s) are the problem here as they are the ones containing the refferences for the controls.
PadexArt at 2007-11-10 23:49:11 >
# 8 Re: Remove a control
PadexArt, I beg to differ...

If using Visual Studio 6.0, please refer to PRB: Can't Remove Controls from the Controls Toolbar in VC++ ( http://support.microsoft.com/default.aspx?scid=kb;en-us;199873). In particular, the cause listed in the article.
Mike Harnad at 2007-11-10 23:50:14 >
# 9 Re: Remove a control
Indeed. :blush: I seldom use controls this way (Insert in project) so none of my DSW's contained such refferences.
PadexArt at 2007-11-10 23:51:17 >
# 10 Re: Remove a control
So the only thing i have to do is to edit (or rename) the dsw file?
Fraben at 2007-11-10 23:52:18 >
# 11 Re: Remove a control
Follow the steps in the article. Or, alternatively, you can just delete the lines that contain the guids for the controls from the .dsw file.
Mike Harnad at 2007-11-10 23:53:16 >