WinCE 窗口居中

CE下面貌似没有PC上的Startposition属性,但是可以通过窗口的Location来重新设置窗口位置。

如下

public MyForm()
{
	InitializeComponent();
	this.Location = new Point((Screen.PrimaryScreen.Bounds.Width - this.Width) / 2, (Screen.PrimaryScreen.Bounds.Height - this.Height) / 2);
}

你可能感兴趣的:(C#,WinCE)