Dmitrij Solov

Dmitrij Solov

  • NA
  • 43
  • 6.5k

Drawing to the screen

Nov 6 2016 12:42 PM
Hello,
 
I Want to draw a geometric object to the screen and then fill it. I can draw it, but don't come any further.
 
I have a button1_Click-Event:
  1. private void button1_Click(object sender, EventArgs e)  
  2. {  
  3.       this.pictureBox1.Paint += new System.Windows.Forms.PaintEventHandler(this.FillEllipseRectangle);  

 And then the FillEllipseRectangle-Event:
  1. private void FillEllipseRectangle(object sender, PaintEventArgs e)  
  2. {  
  3.          MessageBox.Show("well done");
  4.          ...

 I don't recieve the "well done"-message and nothing else in this method is being compiled.
 
I hope somebody can help me.

Answers (8)