qwert Posted January 6, 2008 Share Posted January 6, 2008 At runtime, I want to move my GUI window up so the title bar doesn't show. The height of the title bar differs according to the version of Windows being run (i.e., Vista vs XP -- and Classic vs Std). I can determine the OS version and use a corresponding pixel count, but things are thrown off if the user has specified Classic view. Is there a simple way to find the title bar height? Thanks for any help. Link to comment Share on other sites More sharing options...
Siao Posted January 6, 2008 Share Posted January 6, 2008 _WinAPI_GetSystemMetrics($SM_CYCAPTION) "be smart, drink your wine" Link to comment Share on other sites More sharing options...
covaks Posted January 6, 2008 Share Posted January 6, 2008 GUICreate("Title",-1,-1,-1,0 - _WinApi_GetSystemMetrics($SM_CYCAPTION) -3) if you want it to start right at the client area. -3 for the border, which isn't included in the size returned by $SM_CYCAPTION. Link to comment Share on other sites More sharing options...
qwert Posted January 6, 2008 Author Share Posted January 6, 2008 Thanks very much for the response. Here's the packaged version for anyone that needs it.#include <WinAPI.au3> $res = _WinAPI_GetSystemMetrics($SM_CYCAPTION) MsgBox(32, "Result", "Height = " & $res)Also, here's a link to the full list of available metrics: link Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now