举例要在form2中打开form3窗体,在右下角显示。
form2中写:
form3 form=new form3();
form.show();
在from3自动生成代码中写:
public Form3()
{
InitializeComponent();
int x = System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Size.Width - Form3窗体的宽度;
int y = System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Size.Height - Form3窗体的高度;
Point p = new Point(x, y);
this.PointToScreen(p);
this.Location = p;
}