Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. How to get rid of event code

How to get rid of event code

Scheduled Pinned Locked Moved C#
visual-studiohelptutorialquestion
5 Posts 3 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    User 883718
    wrote on last edited by
    #1

    If I accidentally click on a GUI element or a form in the VS Editor, it produces event code for that element, even if I don't want to handle that event. Then if I deleted that code I get an error. It's annoying and it clutters up my code. Is there a way to get rid of this code, or somewhere I shold move it? Thanks James:confused:

    M 1 Reply Last reply
    0
    • U User 883718

      If I accidentally click on a GUI element or a form in the VS Editor, it produces event code for that element, even if I don't want to handle that event. Then if I deleted that code I get an error. It's annoying and it clutters up my code. Is there a way to get rid of this code, or somewhere I shold move it? Thanks James:confused:

      M Offline
      M Offline
      Mycroft Holmes
      wrote on last edited by
      #2

      In the IDE go to the properties window, change to events view, right click the offending event and RESET.

      Never underestimate the power of human stupidity RAH

      U 1 Reply Last reply
      0
      • M Mycroft Holmes

        In the IDE go to the properties window, change to events view, right click the offending event and RESET.

        Never underestimate the power of human stupidity RAH

        U Offline
        U Offline
        User 883718
        wrote on last edited by
        #3

        Thanks for your help Mycroft, and excuse my human stupidity. James

        modified on Thursday, January 22, 2009 5:55 AM

        M 1 Reply Last reply
        0
        • U User 883718

          Thanks for your help Mycroft, and excuse my human stupidity. James

          modified on Thursday, January 22, 2009 5:55 AM

          M Offline
          M Offline
          Mycroft Holmes
          wrote on last edited by
          #4

          Not a problem, I only recently found that when it turns out C#/VS2008 does not automatically remove it from the designer file :doh:

          Never underestimate the power of human stupidity RAH

          realJSOPR 1 Reply Last reply
          0
          • M Mycroft Holmes

            Not a problem, I only recently found that when it turns out C#/VS2008 does not automatically remove it from the designer file :doh:

            Never underestimate the power of human stupidity RAH

            realJSOPR Offline
            realJSOPR Offline
            realJSOP
            wrote on last edited by
            #5

            Yeah, that's a pain, but it was easily discovered in the error list when a compile is attempted, right? I considered the original message to be a stupid question given the relative simplicity of the answer (all he had to do was double-click the error and it would have taken him to the offending code in the designer).

            "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
            -----
            "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups