I have a problem with multimonitor system and maximizing my borderless C# Winform window. I'd like the form cover two screens, but it only cover the primary screen.
Screen[] screens = Screen.AllScreens;
int height = 0;
int width = 0;
foreach (Screen screen in screens)
{
//take smallest height
height = (screen.Bounds.Height >= height) ? screen.Bounds.Height : height;
width += screen.Bounds.Width;
}
Size = new System.Drawing.Size(width, height);
WindowState = FormWindowState.Maximized;
FormBorderStyle = FormBorderStyle.None;