Jump to content

Recommended Posts

Posted

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.

Posted

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.

Posted

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

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
  • Recently Browsing   0 members

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