SumTingWong 1 Posted October 20, 2004 Share Posted October 20, 2004 Anyone know how to resize/reorder or otherwise manipulate the Quick Launch toolbar programmatically in XP? Thanks. Link to post Share on other sites
MadBoy 3 Posted February 7, 2008 Share Posted February 7, 2008 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) Link to post Share on other sites
Kademlia 0 Posted February 7, 2008 Share Posted February 7, 2008 (edited) Look at this was posted somewhere didn´t find it at first try so i just uploadedManipulate_Taskbar.au3 Edited February 7, 2008 by Kademlia Link to post Share on other sites
MadBoy 3 Posted February 7, 2008 Share Posted February 7, 2008 Look at thiswas posted somewhere didn´t find it at first try so i just uploadedIt'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) Link to post Share on other sites
Kademlia 0 Posted February 7, 2008 Share Posted February 7, 2008 Should link you to:_WinAPI_SetWindowPos which comes from:http://msdn2.microsoft.com/en-us/library/m...545(VS.85).aspx(i didn´t test) Link to post Share on other sites
Richard Robertson 187 Posted February 7, 2008 Share Posted February 7, 2008 Part of the window rectangle is the size. Just keep the location the same and change the width or height. Link to post Share on other sites
MadBoy 3 Posted February 7, 2008 Share Posted February 7, 2008 (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 February 7, 2008 by MadBoy My little company: Evotec (PL version: Evotec) Link to post Share on other sites
Moderators big_daddy 23 Posted February 12, 2008 Moderators Share Posted February 12, 2008 This is probably going to be your best bet.SHAppBarMessage Function Link to post Share on other sites
Siao 7 Posted February 13, 2008 Share Posted February 13, 2008 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" Link to post Share on other sites
MadBoy 3 Posted February 13, 2008 Share Posted February 13, 2008 This is probably going to be your best bet.SHAppBarMessage FunctionThanks 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) Link to post Share on other sites
MadBoy 3 Posted February 13, 2008 Share Posted February 13, 2008 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) Link to post Share on other sites
MadBoy 3 Posted February 13, 2008 Share Posted February 13, 2008 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) Link to post Share on other sites
Moderators big_daddy 23 Posted February 13, 2008 Moderators Share Posted February 13, 2008 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 Link to post Share on other sites
MadBoy 3 Posted February 13, 2008 Share Posted February 13, 2008 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) Link to post Share on other sites
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