:::: MENU ::::

Tuesday, November 20, 2018

Actually this can be done very easily with the Screen class. 
Here is a small sample that display a second form, full screen, on your second monitor if there is one. 

Note: The code is to be put in your main Form class.

protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);

if (Screen.AllScreens.Length > 1)
{

Form2 frm = new Form2();

// Important !
frm.StartPosition = FormStartPosition.Manual;

// Get the second monitor screen
Screen screen = GetSecondaryScreen();

// set the location to the top left of the second screen
frm.Location = screen.WorkingArea.Location;

// set it fullscreen
frm.Size = new Size(screen.WorkingArea.Width, screen.WorkingArea.Height);

// Show the form
frm.Show();

}
}

public Screen GetSecondaryScreen()
{
if (Screen.AllScreens.Length == 1)
{
return null;
}

foreach (Screen screen in Screen.AllScreens)
{
if (screen.Primary == false)
{
return screen;
}
}

return null;
}