我想水平移动表单中的菱形(例如每 200 毫秒 2 个像素)。我在 From_Paint 事件中使用了以下代码。
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);
}
我知道如何移动图片框,但如何处理形状。
谢谢,阿尼