Can't delete control

  • Thread starter Thread starter Babber
  • Start date Start date
B

Babber

Hello,

I have a project that ever time I go to delete a control the IDE adds
it back in when I run the program.

I have tried everything I can think of. It seems that when the control
is deleted the IDE does not remove the code it has auto generated to go
with it.

Any help on how to fix this would be great.

Thanks
 
Hi,

Did you try deleting the control and then going into the windows form
designer generated code section - then delete all references to that control
in there (although I must admit I don't know why you should have to do
this).

HTH,

Bernie Yaeger
 
Thanks for the quick replay. Yes I did that. However every time I run
the program the controls reappear.

I'm starting to think I might just have to redo the whole form.
 
Hi,

Can you send me the code for the form in question? Zip it up and send it to
me at (e-mail address removed).

by the way, which version of vs .net are you running? Which framework?

Bernie
 
Babber,

A trick is,

Rename your form
Create a new form with the original name
Cut the code from the not designer part from the old form (in this sequence)
Paste that in your new form
Select all (controls whatever) on your original form
Cut (not copy)
Paste that on your new form

The sequence that you do this is important, because otherwise by instance
all handles are gone.

I hope this helps,

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top