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)
精彩评论