简体   繁体   English

C#-确定应用程序是否跨多个监视器

[英]C# - Determine if application Spans multiple Monitors

I am wondering if there is a way in C# to determine if a running applications window is using a single monitor or spanning over multiple monitors? 我想知道C#中是否有一种方法可以确定正在运行的应用程序窗口是使用单个监视器还是跨越多个监视器?

I know I can get monitor count for available monitors but not sure how to determine if a current program is spanning over multiple monitors. 我知道我可以获得可用监视器的监视器计数,但是不确定如何确定当前程序是否跨越多个监视器。 Any suggestions? 有什么建议么?

使用Screen.AllScreens查找用户屏幕的位置,并根据窗口位置进行一些数学运算,也许使用Rectangle.Intersects

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

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