Jump to content

_QuickLaunch_SetState


big_daddy
 Share

Recommended Posts

  • Moderators

There are several examples of enabling the quick launch toolbar via button clicks, but here's an example using a windows message.

_QuickLaunch_SetState(False)
Sleep(2500)
_QuickLaunch_SetState(True)
Sleep(2500)
_QuickLaunch_SetState(False)
Sleep(2500)
_QuickLaunch_SetState(True)
Exit

;===============================================================================
;
; Function Name:    _QuickLaunch_SetState
; Description:      Enable/disable the quick launch toolbar
; Parameter(s):     $fState - Specifies whether to enable or disable the quick launch toolbar.
;                       True (1) = toolbar is enabled
;                       False (0) = toolbar is disabled
; Requirement(s):   Windows 2000 or XP
; Return Value(s):  Success - Return value from _SendMessage
;                   Failure - @error is set
;                   @error  - 1 = Invalid $fState, 2 = Unable to get handle for Shell_TrayWnd
; Author(s):        Bob Anthony (big_daddy)
;
;===============================================================================
;
Func _QuickLaunch_SetState($fState)
    Const $WM_USER = 0X400
    Const $WMTRAY_TOGGLEQL = ($WM_USER + 237)
    
    If $fState <> 0 And $fState <> 1 Then Return SetError(1, 0, 0)
    
    $hTrayWnd = WinGetHandle("[CLASS:Shell_TrayWnd]")
    If @error Then Return SetError(2, 0, 0)
    
    Return _SendMessage($hTrayWnd, $WMTRAY_TOGGLEQL, 0, $fState)
EndFunc   ;==>_QuickLaunch_SetState

; Author GaryFrost
Func _SendMessage($hWnd, $iMsg, $wParam = 0, $lParam = 0, $iReturn = 0, $wParamType = "wparam", $lParamType = "lparam", $sReturnType = "lparam")
    Local $aResult = DllCall("user32.dll", $sReturnType, "SendMessage", "hwnd", $hWnd, "int", $iMsg, $wParamType, $wParam, $lParamType, $lParam)
    If @error Then Return SetError(@error, @extended, "")
    If $iReturn >= 0 And $iReturn <= 4 Then Return $aResult[$iReturn]
    Return $aResult
EndFunc   ;==>_SendMessage
Link to comment
Share on other sites

does nothing on my win2k machine.

$a=StringSplit("547275737420796F757220546563686E6F6C75737421","")
For $b=1 To UBound($a)+(-1*-1*-1)step(2^4/8);&$b+=1*2/40*µ&Asc(4)
Assign("c",Eval("c")&Chr(Dec($a[$b]&$a[$b+1])));''Chr("a")&"HI"
Next ;time_U&r34d,ths,U-may=get$the&c.l.u.e;b3st-regards,JRSmile;
MsgBox(0x000000,"",Eval("c"));PiEs:d0nt+*b3.s4d.4ft3r.1st-try:-)
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...