开发者

Move a control to a floating location

I want to move a control in panel1 to the Red Line end from the following example:

private void panel1_Paint(object sender, PaintEventArgs e)
{
    e.Graphics.DrawLine(Pens.Red, 
        new PointF(10.7f, 20f), new PointF(50.5f, 20f));
}

Is that possible in .NET 2.0?

Background

I draw some paths using the float开发者_如何学Pythoning (world) coordinates (PointF). Controls follow this paths.


All you have to do is change it's location:

YourControl.Location = new Point(50, 20)
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜