fork download
  1. private void panel1_MouseDown1(object sender, MouseEventArgs e)
  2. {
  3. this.tmpX = e.X;
  4. this.tmpY = e.Y;
  5. this.panel1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown2);
  6.  
  7. }
  8. private void panel1_MouseDown2(object sender, MouseEventArgs e)
  9. {
  10. System.Drawing.Graphics g = this.panel1.CreateGraphics();
  11. System.Drawing.Pen newPen = new System.Drawing.Pen(Color.Red, 10);
  12. g.DrawLine(newPen,new Point(this.tmpX, this.tmpY), new Point( e.X, e.Y));
  13. this.panel1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown1);
  14. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cs(1,8): error CS1525: Unexpected symbol `void', expecting `class', `delegate', `enum', `interface', `partial', or `struct'
Compilation failed: 1 error(s), 0 warnings
stdout
Standard output is empty