Screen[] allScreens = Screen.AllScreens; Screen currentScreen = Screen.FromRectangle(this.DisplayRectangle); bool isSecondScreen = false; if (allScreens.Length == 2) { foreach (Screen scr in allScreens) { if ((scr==currentScreen)&&(scr!=Screen.PrimaryScreen)) { isSecondScreen = true; } }
关键在于获取是复制桌面状态还是桌面扩展状态的屏幕工作区的Rect矩形填充区,然后使用Gdi去绘制哪些区域应该就可以想怎样就怎样了吧。