Can we move shape (Diamond) in C#

Posted by Ani on Stack Overflow See other posts from Stack Overflow or by Ani
Published on 2010-04-23T17:40:32Z Indexed on 2010/04/23 17:43 UTC
Read the original article Hit count: 696

Filed under:
|
|
|

I want to move a Diamond Shape in the form(for example 2 pixels every 200ms) horizantally. I used the following code in From_Paint Event. private void Form1_Paint(object sender, PaintEventArgs e) { Graphics g = e.Graphics; Point p1 = new Point(5,0); Point p2 = new Point(10, 5); Point p3 = new Point(5, 10); Point p4 = new Point(0, 5); Point[] ps = { p1, p2, p3, p4, p1 }; g.DrawLines(Pens.Black, ps);} I know how to move a picturebox but how to do with shape.

Thanks, Ani

© Stack Overflow or respective owner

Related posts about move

Related posts about shapes