不确定我在这里缺少什么。尝试在某些显示器上显示表单,但它们最终都在同一台显示器上。
private static List<Form> forms = new List<Form>();
public static void Run()
{
foreach (Screen screen in Screen.AllScreens)
{
Image gfx = GetDesktop(screen);
forms.Add(CreateForm(gfx, screen));
}
forms.ForEach(f => f.Show());
}
private static Form CreateForm(Image desktop, Screen screen)
{
Form frm = new Form();
frm.FormBorderStyle = FormBorderStyle.None;
frm.BackgroundImage = desktop;
frm.Location = screen.WorkingArea.Location;
frm.WindowState = FormWindowState.Maximized;
frm.TopMost = true;
frm.ShowInTaskbar = false;
return frm;
}
答案 0 :(得分:3)
尝试frm.StartPosition = FormStartPosition.Manual;