using System.Runtime.InteropServices;
[DllImport("Coredll.dll")]
public static extern int GetSystemMetrics(int nIndex);
private void FormAppClose_Load(object sender, EventArgs e)
{
int x,y;
int swidth = GetSystemMetrics(0);
int sheight = GetSystemMetrics(1);
x = (swidth-this.Width)/2;
y = (sheight-this.Height)/2;
this.Location = new Point(x, y);
}