I\'m making a windows forms application using C#. I add buttons and other controls programmatically at run time. I\'d like to know how to handle those buttons\' click events
Try the following
Button b1 = CreateMyButton(); b1.Click += new EventHandler(this.MyButtonHandler); ... void MyButtonHandler(object sender, EventArgs e) { ... }