【问题标题】:C# main app move to main screen not where it was launched fromC# 主应用程序移动到主屏幕,而不是从它启动的地方
【发布时间】:2021-03-17 17:01:52
【问题描述】:

如果我有两个以上的监视器,我的 C# / .NET 应用程序会在与我运行可执行文件时所在的监视器不同的监视器上打开。这很好,但是所有子窗口都会在屏幕上弹出,而不是从主窗口运行。我需要一种或另一种方式,而不是两者兼而有之。

示例。

  • 监视器:1 个打开的应用程序。
  • 在监视器 1 上打开启动画面
  • 主应用加载到监视器 2(主)
  • 窗口 1 上的登录提示。

我尝试使用屏幕类,但我的屏幕没有移动。

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()

【问题讨论】:

标签: c# monitor


【解决方案1】:

好的,我想我的主应用程序设置为手动,而所有其他应用程序都设置为默认窗口位置。这解决了它。

【讨论】:

    猜你喜欢
    • 2019-07-21
    • 2014-09-10
    • 1970-01-01
    • 2012-05-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-03-04
    相关资源
    最近更新 更多