Results 1 to 3 of 3

Thread: button name not recognised?

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Sep 2002
    Location
    London
    Posts
    19

    button name not recognised?

    I just added a button to a from and then renamed it to btnCancel.

    Then I double clicked on it to add event handler.

    When the code appeared it was still apearing as button4_Click ??

    Any ideas, is there more than one name property in C# ?

  2. #2
    Frenzied Member DevGrp's Avatar
    Join Date
    Nov 2001
    Location
    Charlotte, NC
    Posts
    1,256
    The problem is that you had already double clicked that button, so it was already wired with the default name to the click event handler. Here is how I usually fix it. When that happens, I delete the old method then run the program. VS.NET will give an error saying that method for the click event handler is not available, then gives the line number for the error. Then just delete the line with the error, then you can start all over.
    Dont gain the world and lose your soul

  3. #3
    yay gay PT Exorcist's Avatar
    Join Date
    Apr 2002
    Location
    . . . my reason of shame
    Posts
    2,729
    thats one of the things that most suck in comp. with vb.net..in vb.net there isnt that "bug"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width