C# 如何强制在双显示器系统的主显示器上显示闪屏?
在具有两个显示器的系统中显示启动屏幕时,我遇到了问题。当我在主显示器中启动应用程序,然后在显示启动屏幕之前将鼠标指针移动到第二个显示器时,我的启动屏幕“跟随”鼠标指针。这意味着,启动画面显示在第二个显示器中,完成工作后,启动画面消失,应用程序显示在主显示器中。这看起来很丑陋而且不专业。
我尝试在表单的属性中设置属性 FormStartPosition.CenterScreen ,并在运行时在表单的构造函数中设置它,但这些都不起作用。顺便说一句,我正在使用 C#。
有什么提示可以实现启动画面与我的应用程序显示在同一监视器中吗?
任何帮助将不胜感激。
问候, 胜利者
I'm facing a problem when displaying a splash screen in a system with two monitors. When I start the application in the primary display, and then the mouse pointer is moved to the second monitor before the splash screen is shown, my splash screen "follows" the mouse pointer. That means, the splash screen is shown in the 2nd display and after it finishes its work, dissapears and the application is displayed in the primary monitor. This looks pretty ugly and unprofessional.
I have tried to set the property FormStartPosition.CenterScreen in the form's properties and set it in run time in the constructor of my form but none of this has worked. By the way, I'm using C#.
Any hints to achieve that the splash screen be displayed in the same monitor as my application?
Any help will bee deeply appreciated.
Greetings,
Victor
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在 Main 中,您需要强制表单在主监视器上启动。下面介绍了如何在主显示器上打开 (0, 0) 处的表单。
In Main, you need to force the form to start on the primary monitor. Here's how to open a form at (0, 0) on the primary monitor.