如果我有两个以上的监视器,我的 C#/.NET 应用程序会在与我运行可执行文件时所在的监视器不同的监视器上打开。这很好,但是所有子窗口都弹出它不是从主窗口运行的屏幕上。我需要一种或另一种方式,而不是两者都需要。
示例。
我尝试过使用 screen 类,但我的屏幕没有移动。
Login login = new Login();
login.ShowInTaskbar = false;
login.Owner = this;
this.Location = Screen.GetWorkingArea(login).Location;//this is my main application that moves off the screen. I'm trying to bring it back.
login.ShowDialog()
答案 0 :(得分:0)
好的,我想我的主应用程序设置为手动,而所有其他应用程序都设置为默认窗口位置。这修复了它。