Closed ItsProfessional closed 1 year ago
This will always move the window to the center of the rectangle bounding all displayable area. Even if this causes no major problems (people rarely have holes in the middle of their screen configuration), it might move a window to a different monitor, or put it off-center.
The correct way to do this is MonitorFromWindow -> GetMonitorInfoW to get where the current monitor is and center it there.
I have updated the code
Shows the window (MainDialog) at the center of the screen, instead of the top left position which it uses by default.