简体   繁体   English

在目标监视器上显示

[英]Display for on target Monitor

Not sure what i'm missing here. 不知道我在这里想念的是什么。 Trying to display forms on certain monitors but they all end up on the same monitor. 试图在某些监视器上显示表单,但它们最终都在同一监视器上。

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;
}

尝试frm.StartPosition = FormStartPosition.Manual;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM