Jump to content

Search the Community

Showing results for tags 'screen size'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 1 result

  1. Hi, I have a monitor running at 1920x1080 (1080p) and another running at 3840x2160 (4K). I'm having real trouble obtaining the screen sizes and placing a multiwindow GUI. I've tried a number of scripts available in the forums, but they all are reporting the same results. Here's the script that I'm currently using which I've gotten from the Internet ;author: ahha ;filename: determine screen sizes v1b.au3 ;http://msdn.microsoft.com/en-us/library/ms724385%28VS.85%29.aspx $VirtX = DllCall("user32.dll", "int", "GetSystemMetrics", "int", 78) ;SM_CXVIRTUALSCREEN 78 ;The width of the virtual screen, in pixels. The virtual screen is the bounding rectangle of all display monitors. ;The SM_XVIRTUALSCREEN metric is the coordinates for the left side of the virtual screen. $VirtY = DllCall("user32.dll", "int", "GetSystemMetrics", "int", 79) ;SM_CYVIRTUALSCREEN 79 ;The height of the virtual screen, in pixels. The virtual screen is the bounding rectangle of all display monitors. ;The SM_YVIRTUALSCREEN metric is the coordinates for the top of the virtual screen. $Mons = DllCall("user32.dll", "int", "GetSystemMetrics", "int", 80) ;SM_CMONITORS 80 ;The number of display monitors on a desktop. For more information, see the Remarks section in this topic. ;Remarks ;System metrics can vary from display to display. ;GetSystemMetrics(SM_CMONITORS) counts only visible display monitors. This is different from EnumDisplayMonitors, which enumerates both visible display monitors and invisible pseudo-monitors that are associated with mirroring drivers. An invisible pseudo-monitor is associated with a pseudo-device used to mirror application drawing for remoting or other purposes. $LSVS = DllCall("user32.dll", "int", "GetSystemMetrics", "int", 76) ;SM_XVIRTUALSCREEN 76 ;The coordinates for the left side of the virtual screen. The virtual screen is the bounding rectangle of all display monitors. ;The SM_CXVIRTUALSCREEN metric is the width of the virtual screen. $TSVS = DllCall("user32.dll", "int", "GetSystemMetrics", "int", 77) ;SM_YVIRTUALSCREEN77 ;The coordinates for the top of the virtual screen. The virtual screen is the bounding rectangle of all display monitors. ;The SM_CYVIRTUALSCREEN metric is the height of the virtual screen. $PriDispX = DllCall("user32.dll", "int", "GetSystemMetrics", "int", 0) ;SM_CXSCREEN 0 ;The width of the screen of the primary display monitor, in pixels. ;This is the same value obtained by calling GetDeviceCaps as follows: GetDeviceCaps( hdcPrimaryMonitor, HORZRES). $PriDispY = DllCall("user32.dll", "int", "GetSystemMetrics", "int", 1) ;SM_CYSCREEN 1 ;The height of the screen of the primary display monitor, in pixels. ;This is the same value obtained by calling GetDeviceCaps as follows: GetDeviceCaps( hdcPrimaryMonitor, VERTRES). $mz = "SM_CXSCREEN = "&$PriDispX[0] &" SM_CYSCREEN = "&$PriDispY[0] $m0 = "@DesktopWidth = "&@DesktopWidth &" @DesktopHeight = "&@DesktopHeight $m1 = "Number of visible screen monitors: " & $Mons[0] $m2 = "Maximum size of 'virtual screen' : " & $VirtX[0] &"x"& $VirtY[0] $m3 = "Full 'virtual screen' coordinates: " & $LSVS[0] &"," & $TSVS[0] &" to "& $VirtX[0] &","& $VirtY[0] MsgBox(0+262144, "Status of determine screen sizes", $mz &@CRLF& $m0 &@CRLF& $m1 &@CRLF& $m2 &@CRLF& $m3) This reports a virtual screen of 3456x1719 (what???). What does the virtual screen mean, and why isn't it a combination of both screen. Also it reports DesktopWidth as 1920 and DesktopHeight as 1080, i.e. the smaller of two displays. I'm trying to create two GUIs that is maximised on each screen, but these numbers are wrong. Please help. Thanks.
×
×
  • Create New...