Sign in to follow this  
Followers 0
qwert

How to find height of title bar?

4 posts in this topic

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.

Share this post


Link to post
Share on other sites



_WinAPI_GetSystemMetrics($SM_CYCAPTION)


"be smart, drink your wine"

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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
Sign in to follow this  
Followers 0