Search the Community
Showing results for tags 'screen resolution'.
-
Hi, I made a small blunder with my code. I created the GUI under 1920x1080 resolution however, my user is configured to ONLY 1080x720 and cannot go any further than that. What do you guys think is the best way to correct this one? Resolution mathematics is something that came to mind however I do not have access to his PC to check from time to time if my estimation is correct and the resolution on my PC doesn't go down to 1080x720. Please help. ~XN~
-
I recently upgraded my laptop to one with Windows 10 and higher screen resolution. In the process I found that some of my scripts did not work right when using Autoit's @DesktopWidth and @DesktopHeight macros. Insteat of 1920 x 1080 resolution Autoit detects 1536 x 864. Thus, GUIs designed to appear near the right edge of the screen displayed closer to the horizontal middle of the screen. I assume others may have the same problem. A search on this forum and Microsoft Script Center helped me to write the following script that gets the true screen width and height from WMI. MsgBox(0, '', _GetMonitorInfo()) Func _GetMonitorInfo() Local $oWMI, $Listing, $sWidth = 0, $sHeight = 0 $oWMI = ObjGet("winmgmts:\\" & @ComputerName & "\root\CIMV2") If IsObj($oWMI) Then $Listing = $oWMI.ExecQuery("SELECT * FROM Win32_DesktopMonitor") If IsObj($Listing) Then For $oItem In $Listing $sHeight = $oItem.ScreenHeight $sWidth = $oItem.ScreenWidth Next EndIf EndIf Return "Width: " & $sWidth & @CRLF & "Height: " & $sHeight EndFunc ;_GetMonitorInfo Hopefully it will benefit others. I for sure am very happy with all the samples I been able to find here in the past.
- 6 replies
-
- windows
- screen resolution
-
(and 3 more)
Tagged with: