I am looking for a way to verify that the window that I create is visible and completely on the same monitor. I saw that too many programs do unpleasant things when they try to regain their position, and the place no longer exists, and I do not want my program to be vulnerable to this.
How to find information about the actual location of monitors?
The Screen class contains many functions for this.
You should check yourself if the form is outside the borders of the screen, but it is quite simple:
if (!Screen.GetWorkingArea(myWindow).Bounds.Contains(myWindow.Bounds)) { // Adjust location }
Just a small syntax correction, or possibly an update in Visual Studio 2012:
if (!Screen.GetWorkingArea(myWindow).Contains(myWindow.Bounds)) { //Adjust location }
Source: https://habr.com/ru/post/1757745/More articles:javascript performance between thin client and pc - performanceКак включить PDB файлы в Silverlight XAP? - debuggingThe Linux kernel that runs the python file for init - pythonHTML / ASP.NET Source Spell Checking Software - asp.netЯвляется ли это допустимым комментарием XML? - xmlJust sqlalchemy filter not working - pythonHow to disable this part of the CK editor? - javascriptДолжен ли я делать исключение при ошибках ввода пользователя? - phpHow to implement my own FilterSecurityInterceptor filter using grails 1.3.2 and spring-security-core 1 plugin? - javagcc, static library, external assembly becomes undefined - assemblyAll Articles