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);
}
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章