0

So, I would double click here on my designer

enter image description here

and it should create me the code, but well it doesn't. And there is no value changed event in the events either.

So if anyone knows how to fix this, it would be nice. (I doubt it) so how would I get around this? How would I go on about creating the code myself that should be created when I double click on it?

Roman Marusyk
  • 23,328
  • 24
  • 73
  • 116

1 Answers1

0
  1. Click the form or control that you want to create an event handler for.
  2. In the Properties window(F4), click the Events button
  3. In the list of available events, click the event that you want to create an event handler for.
  4. In the box to the right of the event name, type the name of the handler and press ENTER.
  5. Add the appropriate code to the event handler.

To create an event handler in the code editor

  1. Switch to the code editor by using one of the following techniques:
  2. Create a new method like:

    private void buttonName_Click(object sender, EventArgs e) { ... }

  3. In the file YourFormName.Designer.cs find your button and add

    this.buttonName.Click += new System.EventHandler(this.buttonName_Click);

Roman Marusyk
  • 23,328
  • 24
  • 73
  • 116