Jump to content

Determine the heigth of the Menu Bar


Recommended Posts

How can we find the height of the Menu Bar?

I wanna place a window exactly above the Menu bar like this:

#include <GUIConstants.au3>

$AppWith = 300
$AppHeigt = 500
$MainForm= GUICreate("MainForm",$AppWith , $AppHeigt, @DesktopWidth - $AppWith, @DesktopHeight - $AppHeigt )

GUISetState(@SW_SHOW)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd

Unfortunatly the above screen doesn't take the height of the Menu bar in count.

Any help would be appreciated.

Thx.

Link to comment
Share on other sites

How can we find the height of the Menu Bar?

I wanna place a window exactly above the Menu bar like this:

... (edit - code snipped for space)

Unfortunatly the above screen doesn't take the height of the Menu bar in count.

Any help would be appreciated.

Thx.

You'll probably also want to account for if they've docked the taskbar on a different edge of the screen as well (left-side, top, right-side).

- MoChr(77)& Chr(97)& Chr(100)& Chr(101)& Chr(32)& Chr(121)& Chr(97)& Chr(32)& Chr(108)& Chr(111)& Chr(111)& Chr(107)-------I've told you 100,000 times not to exaggerate!-------Don't make me hit you with my cigarette hand...-------My scripts:Random Episode Selector, Keyboard MouseMover, CopyPath v2.1, SmartRename for XP,Window Tracer[sup]New![/sup]

Link to comment
Share on other sites

$tray_pos = WinGetPos("classname=Shell_TrayWnd")
    $tray_height = $tray_pos[3]
... Gives following error :

C:\temp\test2.au3 (2) : ==> Subscript used with non-Array variable.: 
$tray_height = $tray_pos[3] 
$tray_height = $tray_pos^ ERROR

Any ideas?

My AutoIt Version: 3.2.8.1

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...