Can't delete control

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Babber

    #1

    Can't delete control

    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

  • Bernie Yaeger

    #2
    Re: Can't delete control

    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

    "Babber" <babcockc@gmail .com> wrote in message
    news:1116453857 .397778.302680@ g14g2000cwa.goo glegroups.com.. .[color=blue]
    > 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
    >[/color]


    Comment

    • Babber

      #3
      Re: Can't delete control

      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.

      Comment

      • Bernie Yaeger

        #4
        Re: Can't delete control

        Hi,

        Can you send me the code for the form in question? Zip it up and send it to
        me at berniey@optonli ne.net.

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

        Bernie

        "Babber" <babcockc@gmail .com> wrote in message
        news:1116462969 .262753.128090@ g47g2000cwa.goo glegroups.com.. .[color=blue]
        > 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.
        >[/color]


        Comment

        • Cor Ligthert

          #5
          Re: Can't delete control

          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


          Comment

          Working...