I have two displays (two monitors) connected to my machine, and I noticed a strange thing happening today. I had an Explorer window open with my compiled exe on my primary d
This should do the trick:
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Form1 f = new Form1();
f.StartPosition = FormStartPosition.Manual;
f.Location = Screen.PrimaryScreen.Bounds.Location;
Application.Run(f);
}
Screen[] myScreen = Screen.AllScreens;
this.Location = myScreen[0].WorkingArea.Location; // Primary Screen
this.Location = myScreen[1].WorkingArea.Location; // Secondary Screen
Take a look at this: Show form on primary or secondary screen