Sign in to follow this  
Followers 0
Skorm92

GUI Position minus taskbar height

10 posts in this topic

Hi there!

I'm looking for a way to position my gui above the taskbar,

I already have it located in the lower right corner using @DesktopHeight & @DesktopHeight.

But my client is exactly above the taskbar while at a friends computer it positions itself a bit underneath the taskbar which makes some buttons unfunctional.

 

How can I retreive the taskbar size?

 

Thank you in advance!

Share this post


Link to post
Share on other sites



Try:

Global $aTaskbar = WinGetPos("[CLASS:Shell_TrayWnd;INSTANCE:1]", "") 

Br,

UEZ


Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Share this post


Link to post
Share on other sites

Neither work for me :(

Share this post


Link to post
Share on other sites

Skorm92,

Look in my Toast UDF - the _Toast_Locate function shows how I determine the taskbar position and location by getting the available workarea size via a SystemParametersInfoW call. :)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

Post your code...

Why do you need my code, Within my question there is nothing that requires you to review my code.

I used a blank file to test the above posted codes..

Melba23,

I will look into it! Thank you.

Share this post


Link to post
Share on other sites

I've been looking into your UDF, Although I can see toast_locate I can't really seem to find the exact command that reads the taskbar size/position

Share this post


Link to post
Share on other sites

From Melba's Toast UDF :

#Include <Array.au3> ; just for _ArrayDiplay

If @AutoItVersion < "3.3.8.0" Then
    $tWorkArea = DllStructCreate("long Left;long Top;long Right;long Bottom")
Else
    $tWorkArea = DllStructCreate("struct;long Left;long Top;long Right;long Bottom;endstruct")
EndIf

DllCall("user32.dll", "bool", "SystemParametersInfoW", "uint", 48, "uint", 0, "ptr", DllStructGetPtr($tWorkArea), "uint", 0)
If @error Then Return SetError(2, 0, -1)
Local $aWorkArea[4] = [DllStructGetData($tWorkArea, "Left"), DllStructGetData($tWorkArea, "Top"), _
        DllStructGetData($tWorkArea, "Right"), DllStructGetData($tWorkArea, "Bottom")]

_ArrayDisplay($aWorkArea)

Share this post


Link to post
Share on other sites

Same idea...

$hGui = GuiCreate("test")
GuiSetState()

$WorkAera = _GetWorkArea()
WinMove($hGui, "", $WorkAera[0], $WorkAera[1], $WorkAera[4], $WorkAera[5])

While GUIGetMsg() <> -3
WEnd

Func _GetWorkArea()
    Local $Area[6]
    Local $StartRect = DllStructCreate("int[4]")
    Local $PStartRect = DllStructGetPtr($StartRect)
    DllCall("user32.dll", "int", "SystemParametersInfo", "int", 48, "int", 0, "ptr", $PStartRect, "int", 0)
    $Area[0] = DllStructGetData($StartRect,1,1)
    $Area[1] = DllStructGetData($StartRect,1,2)
    $Area[2] = DllStructGetData($StartRect,1,3)
    $Area[3] = DllStructGetData($StartRect,1,4)
    $Area[4] = $Area[2] - $Area[0]
    $Area[5] = $Area[3] - $Area[1]
    Return $Area
EndFunc
1 person likes this

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