irwin young

irwin young

  • NA
  • 7
  • 1.5k

Adding events using WINFORMS

Mar 17 2012 4:00 PM
i have already existing program which contain form and handle line like:

this.pictureBox1.Paint += new System.Windows.Forms.PaintEventHandler(this.pictureBox1_Paint);
this.pictureBox1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.pictureBox1_MouseDown);
this.pictureBox1.MouseMove += new System.Windows.Forms.MouseEventHandler(this.pictureBox1_MouseMove);
this.pictureBox1.MouseUp += new System.Windows.Forms.MouseEventHandler(this.pictureBox1_MouseUp);

i saw that whenever i add a new component like button a new event line is added like:
this.button1first.Click += new System.EventHandler(this.button1_Click);

when i created a new winform project i saw that such handle lines were not created when i added a button
how can i cause the ide to add automaticly those event lines

Answers (7)