Jump to content

GUI Get Height?


Penny
 Share

Recommended Posts

Hey again, the script I'm making needs to be able to run in multiple resolutions and OSs, as such I need to know what's the height of a maximized window (that is, excluding the taskbar, however tall it might be)

Local $g = GUICreate("MAXIMIZED",-1,-1,-1,-1,BitOR($GUI_SS_DEFAULT_GUI,$WS_MAXIMIZEBOX))
GUISetState(@SW_SHOW)
Sleep(800)
GUISetState(@SW_MAXIMIZE)
Sleep(1500)
ConsoleWrite(@DesktopWidth & ". h: " &  @DesktopHeight & @CRLF)

how would I get the window's actual height from there?

also I would actually like to have the top/left/right/bottom of the form.

Edited by Penny
Link to comment
Share on other sites

I tried using _WinAPI_GetWindowPlacement but that doesn't work with the maximized window, it gives me the normal-state coords.

basically what I want is the Position / Size as given by the Window Info utility by AutoIt.

Edited by Penny
Link to comment
Share on other sites

Hi,

try

WinGetClientSize
...

Local $g = GUICreate("MAXIMIZED",-1,-1,-1,-1,BitOR($GUI_SS_DEFAULT_GUI,$WS_MAXIMIZEBOX))
GUISetState(@SW_SHOW)
Sleep(800)
GUISetState(@SW_MAXIMIZE)
Sleep(1500)
ConsoleWrite(@DesktopWidth & ". h: " &  @DesktopHeight & @CRLF)



$win_size = WinGetClientSize("MAXIMIZED")

MsgBox(0,"",$win_size[0]&" x "&$win_size[1])
Edited by Mison

Hi ;)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...