在一个Form1中的Button1点击显示Form2,我想让Form2显示在Button1的下面,怎么办?
Form2 frm = new Form2();
//frm.DesktopLocation = new Point(button1.Left, button1.Right);
frm.SetDesktopLocation(button1.Left, button1.Right);
frm.ShowDialog(this);
这样不行呢??
Form2 frm = new Form2();
//frm.DesktopLocation = new Point(button1.Left, button1.Right);
frm.SetDesktopLocation(button1.Left, button1.Right);
frm.ShowDialog(this);
这样不行呢??
不可以么。
然后,那个button的left和right是基于form1的值吧
如果想要用的话,还得加上form1的左右值,另外还有button的长宽
我想,Form2的显示跟着Form1的Button1走