Home Bunny Posted March 20, 2008 Posted March 20, 2008 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.
Zedna Posted March 20, 2008 Posted March 20, 2008 $tray_pos = WinGetPos("classname=Shell_TrayWnd") $tray_height = $tray_pos[3] Resources UDF ResourcesEx UDF AutoIt Forum Search
Monamo Posted March 20, 2008 Posted March 20, 2008 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]
Home Bunny Posted March 20, 2008 Author Posted March 20, 2008 $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
Home Bunny Posted March 20, 2008 Author Posted March 20, 2008 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).Yes indeed, didn't tought about that.However i don't now how
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