C# winform 中panel控件的坐标如何设置?

2024-11-19 18:42:23
推荐回答(2个)
回答1:

private void panel1_Paint(object sender, PaintEventArgs e)
{
panel1.Location = new Point(10, 10); //中间的数据填写你想要的

}

回答2:

1. 一般赋值 panel3.Location = new Point(X,Y);
2.MouseClick事件 panel3.Location = new Point(e.X ,e.Y);