Sign in to follow this  
Followers 0
SumTingWong

Changing Quick Launch toolbar

14 posts in this topic

Anyone know how to resize/reorder or otherwise manipulate the Quick Launch toolbar programmatically in XP?

Thanks.

Share this post


Link to post
Share on other sites



Anyone know how to resize/reorder or otherwise manipulate the Quick Launch toolbar programmatically in XP?

Thanks.

Maybe someone have found a way to do this since then ? I would be interested aswell :)


My little company: Evotec (PL version: Evotec)

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Look at this

was posted somewhere didn´t find it at first try so i just uploaded

Manipulate_Taskbar.au3

Edited by Kademlia

Share this post


Link to post
Share on other sites

Look at this

was posted somewhere didn´t find it at first try so i just uploaded

It's not doing what i require. I want to Resize the Quick Launch. The script provided has things not related :)


My little company: Evotec (PL version: Evotec)

Share this post


Link to post
Share on other sites

Part of the window rectangle is the size. Just keep the location the same and change the width or height.

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

Part of the window rectangle is the size. Just keep the location the same and change the width or height.

So i tried a bit but this seems to work only partially. This kinda shrinks / extends amount of icons visible however the Quick Launch size stays the same.

#include <WinAPI.au3>

_ResizeQuickLaunchBar()

Func _ResizeQuickLaunchBar($fShow = True, $iIndex = 1)
    Local $hTaskBar, $hRebar, $hToolBar
    $hTaskBar = _WinAPI_FindWindow("Shell_TrayWnd", "")
    $hRebar = ControlGetHandle($hTaskBar, "", "ReBarWindow321")
    $hToolBar = ControlGetHandle($hRebar, "", "ToolbarWindow32" & $iIndex)
    If $hToolBar <> 0x00000000 Then
        If $fShow Then
        ;    _WinAPI_SetWindowPos($hTaskBar, "", 116, -1, 300, 60, $SWP_NOZORDER )
            _WinAPI_SetWindowPos($hToolBar, "", 5, 2, 300, 60 , $SWP_NOZORDER  )
           ;_WinAPI_ShowWindow($hToolBar, $SW_SHOW)
        Else
           ; _WinAPI_ShowWindow($hToolBar, $SW_HIDE)
        EndIf
    EndIf
EndFunc   ;==>_ShowProgramsShowingInTaskBar
Edited by MadBoy

My little company: Evotec (PL version: Evotec)

Share this post


Link to post
Share on other sites

To resize, use _GUICtrlRebar_SetBandLength() and other funcs from GuiRebar UDF. To work with it's buttons, use GuiToolBar UDF.


"be smart, drink your wine"

Share this post


Link to post
Share on other sites

This is probably going to be your best bet.

SHAppBarMessage Function

Thanks Big_Daddy.. if only i would be good with DllCall stuff :) I guess it's time to try and learn it. Any good tutorial for DLLCALLS?

Thanks Siao, i'll take a look and see if i can get it to work :)


My little company: Evotec (PL version: Evotec)

Share this post


Link to post
Share on other sites

To resize, use _GUICtrlRebar_SetBandLength() and other funcs from GuiRebar UDF. To work with it's buttons, use GuiToolBar UDF.

Indeed Siao it works :) Now i need to find a way to get "required" size to fill in all icons in the Launch Bar. Thanks!!

#include <WinAPI.au3>
#include <GuiReBar.au3>
#include <GuiToolbar.au3>
#include <Array.au3>
;~ #include <WindowsConstants.au3>

Global Const $SW_HIDE                           = 0
Global Const $SW_SHOW                           = 5

_ResizeQuickLaunchBar()

Func _ResizeQuickLaunchBar($fShow = True, $iIndex = 1)
    Local $hTaskBar, $hRebar, $hToolBar
    $hTaskBar = _WinAPI_FindWindow("Shell_TrayWnd", "")
    $hRebar = ControlGetHandle($hTaskBar, "", "ReBarWindow321")
    $hToolBar = ControlGetHandle($hRebar, "", "ToolbarWindow32" & $iIndex)
    $hToolBar2 = ControlGetHandle($hRebar, "", "ToolbarWindow322")

    MsgBox(0,1,_GUICtrlToolbar_ButtonCount($hToolBar2))
    _GUICtrlRebar_SetBandLength($hRebar, 0, 300)
EndFunc   ;==>_ShowProgramsShowingInTaskBar

My little company: Evotec (PL version: Evotec)

Share this post


Link to post
Share on other sites

Tada! It works! Thanks Siao :) For those interested code below.

#include <WinAPI.au3>
#include <GuiReBar.au3>
#include <GuiToolbar.au3>

_ResizeQuickLaunchBar()

Func _ResizeQuickLaunchBar()
    Local $hTaskBar = _WinAPI_FindWindow("Shell_TrayWnd", "")
    Local $hRebar = ControlGetHandle($hTaskBar, "", "ReBarWindow321")
    Local $hToolBar = ControlGetHandle($hRebar, "", "ToolbarWindow322")
    Local $user_icon_width = 24, $user_icon_height = 30
    Local $user_icons_count = _GUICtrlToolbar_ButtonCount($hToolBar)
    Local $user_icons_rows = _GUICtrlToolbar_GetRows($hToolBar)
    Local $user_bar_height = _GUICtrlRebar_GetRowHeight($hRebar,0)
    _GUICtrlRebar_SetBandLength($hRebar, 0, $user_icons_count/($user_bar_height/$user_icon_height)* $user_icon_width + 20)
EndFunc   ;==>_ShowProgramsShowingInTaskBar

My little company: Evotec (PL version: Evotec)

Share this post


Link to post
Share on other sites

How about this...

#include <WinAPI.au3>
#include <GuiReBar.au3>

_ResizeQuickLaunchBar()

Func _ResizeQuickLaunchBar()
    Local $iIndex = 0
    Local $hTaskBar = _WinAPI_FindWindow("Shell_TrayWnd", "")
    Local $hRebar = ControlGetHandle($hTaskBar, "", "ReBarWindow321")
    _GUICtrlRebar_MinimizeBand($hRebar, $iIndex)
    _GUICtrlRebar_MaximizeBand($hRebar, $iIndex, True)
EndFunc   ;==>_ResizeQuickLaunchBar

Share this post


Link to post
Share on other sites

How about this...

#include <WinAPI.au3>
#include <GuiReBar.au3>

_ResizeQuickLaunchBar()

Func _ResizeQuickLaunchBar()
    Local $iIndex = 0
    Local $hTaskBar = _WinAPI_FindWindow("Shell_TrayWnd", "")
    Local $hRebar = ControlGetHandle($hTaskBar, "", "ReBarWindow321")
    _GUICtrlRebar_MinimizeBand($hRebar, $iIndex)
    _GUICtrlRebar_MaximizeBand($hRebar, $iIndex, True)
EndFunc   ;==>_ResizeQuickLaunchBar
Works great :) Less calculations and probably better way (proper) to do this :) Thanks

My little company: Evotec (PL version: Evotec)

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