-1

Ordinarily, when designing a page (winform), I'm all for double-clicking the object, and having an event method created.

Now, I'd like to know how to STOP these methods from being automatically generated, because they are getting generated, when I single CLICK on an object for editing purposes!!!

Then, I have to:

  1. go into the source code and delete the method

  2. go into the designer code and delete the event creation code

  3. back into the designer view, wait a few seconds for whatever it's doing

This is a hair-pulling experience! Help!

Raynoceros
  • 386
  • 2
  • 15
  • 1
    Why are you double-clicking the events in the events window if you don't want to create handlers? – ProgrammingLlama Mar 05 '20 at 07:48
  • You can simply press `CTRL+Z` and the newly created event is removed. – Jimi Mar 05 '20 at 10:31
  • You can also press `CTRL + -` (minus) after, to go back to the Form Designer. – Jimi Mar 05 '20 at 10:38
  • I'm not double-clicking events. I'm designing a form, with many objects--within (unfortunately) the tablepanellayout. When I try to re-size a row or column, by clicking (ONCE) to get the resizer tool, it is interpreted as a DOUBLE-CLICK--which leads to an event method being created! – user1845588 Mar 06 '20 at 14:05

1 Answers1

0

Unfortunately you can't disable it, but there is one way to quick undo.

When you accidentally generate the event by double clicking anything in the designer view:

  1. In the designer page, open the properties window of the control, lookup the event you just created.

  2. Right click and select Reset

reset the event!

Raynoceros
  • 386
  • 2
  • 15
  • I already know about how to UNDO the "damage"--my hope was that there was some option that can be set, to disallow any auto-generated methods. Unfortunely, since I am dealing with a lot of objects, I lose a considerable amount of time, each time I have to UNDO these unwanted methods! (Kind of ironic, for a system that's generally known to be UNABLE or CANNOT do most things requested of it!) – user1845588 Mar 06 '20 at 14:06
  • @user1845588 i know your problem i was facing it too, but all we can do is using the minimal amount of time and effort to UNDO the "damage". and hope upcoming update of VS has an option for this. – Raynoceros Mar 07 '20 at 08:47