none
Deleting left over controls RRS feed

  • Question

  • After messing around with my form by using cut, paste and delete on controls and panels with controls inside i got a few left over controls that aren't displayed anywhere and thus i can't find any way to delete them. I can see they exist when clicking on the drop down list on the properties view but otherwise they don't appear to be connected to the form or shown anywhere. Is there a way to delete these controls or do i have to be more careful when i delete panels full of controls to avoid problems like these?

    Monday, February 18, 2008 5:30 PM

Answers

  •  

    Hi Malazur,

    Another choice is to use the Visual Studio Document Outline window to navigate to the invisible control and press delete key to delete the control. To show the Visual Studio Document Outline window, please click View -> Other windows -> Document Outline.

    Hope this helps.
    Best regards.
    Rong-Chun Zhang

    Friday, February 22, 2008 10:56 AM
  • If you select the controls from the drop down list on the right hand side of the IDE you should see the "outline" of them on the form in question in design mode.  You can then press the Delete key on the keyboard to remove them.

     

    If that fails you can go into the Windows created region of the code and manually remove the initialization lines there.  Try the first way first, it's much easier. Smile

     

     

    Monday, February 18, 2008 6:46 PM

All replies

  • If you select the controls from the drop down list on the right hand side of the IDE you should see the "outline" of them on the form in question in design mode.  You can then press the Delete key on the keyboard to remove them.

     

    If that fails you can go into the Windows created region of the code and manually remove the initialization lines there.  Try the first way first, it's much easier. Smile

     

     

    Monday, February 18, 2008 6:46 PM
  • The control outline doesn't appear as i mentioned before, because these controls aren't linked to any visible panel. I already tried to delete the initialization lines but then i get compilation errors and the form doesn't load. Thanks anyway for trying to help.

    Monday, February 18, 2008 8:06 PM
  •  

    Hi Malazur,

    Another choice is to use the Visual Studio Document Outline window to navigate to the invisible control and press delete key to delete the control. To show the Visual Studio Document Outline window, please click View -> Other windows -> Document Outline.

    Hope this helps.
    Best regards.
    Rong-Chun Zhang

    Friday, February 22, 2008 10:56 AM