Sign in to follow this  
Followers 0
Aassdd

How to hide taskbar?

3 posts in this topic

I have this code:

;~ #NoTrayIcon
HotKeySet("^!#l", "_lock")
Opt("WinTitleMatchMode", 4)

While 1
    If WinExists("Windows Task Manager") Then
        WinClose("Windows Task Manager")
        $input = InputBox("Locker", "Password:", "", "", Default, 125)
        If $input <> "test"  Then
            MsgBox(16, "Error", "Password incorrect.")
            BlockInput(1)
            MouseMove(@DesktopWidth, @DesktopHeight, 0)
            ContinueLoop
        Else
            ExitLoop
        EndIf
    EndIf
WEnd

WinSetState("Program Manager", "", @SW_SHOW)
WinSetState("[CLASS:ToolbarWindow32]", "", @SW_SHOW)
BlockInput(0)
If Not @error Then MsgBox(64, "Locker", "Succesfuly unlocked.")
Exit

Func _lock()
    BlockInput(1)
    MouseMove(@DesktopWidth, @DesktopHeight, 0)
    WinSetState("Program Manager", "", @SW_HIDE)
    WinSetState("[CLASS:ToolbarWindow32]", "", @SW_HIDE)
EndFunc   ;==>_lock

And I want to:

1. Hide the desktop (already done) and taskbar (how?)

2. Enable keypresses only in the input box because when I press ctrl alt del the mouse is enabled again.

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

use _MouseTrap() and...check out GaryFrost's taskbar fun...go search it...he has a function that will remove the start menu

Using BlockInput() is very stupid in a 'lock' case...because if you want to unlock it? how? you have BLOCKED ALL INPUT...just use mousetrap...and use winsetontop...alot...it will work much better.

Edited by Swift

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Can someone make this work? Mouse doesn't get trapped when inputbox appears.

*EDIT*

Here is my current script. I still have a problem with the inputbox because while the inputbox exists the win key can be pressed and anything can be activated.

;~ #NoTrayIcon
#include <Misc.au3>
#include <WinAPI.au3>
HotKeySet("^!#l", "_lock")
Opt("WinTitleMatchMode", 4)

Global Const $SW_HIDE = 0
Global Const $SW_SHOW = 5
$locked = 0
$iPos = MouseGetPos()
$TaskBar = _WinAPI_FindWindow("Shell_TrayWnd", "")

While 1
    If WinExists("Windows Task Manager") And $locked = 1 Then
        WinClose("Windows Task Manager")
        $input = InputBox("Locker", "Password:", "", "*", Default, 125)
        BlockInput(0)
        _MouseTrap($iPos[0], $iPos[1])
        If $input <> "test"  Then
            MsgBox(16, "Error", "Password incorrect.")
            BlockInput(1)
            MouseMove(@DesktopWidth, @DesktopHeight, 0)
            ContinueLoop
        Else
            ExitLoop
        EndIf
    EndIf
WEnd

BlockInput(0)
WinSetState("Program Manager", "", @SW_SHOW)
_WinAPI_ShowWindow($TaskBar, $SW_SHOW)
_MouseTrap()
BlockInput(0)
$locked = 0
If Not @error Then MsgBox(64, "Locker", "Succesfuly unlocked.")
WinMinimizeAllUndo()
Exit

Func _lock()
    $locked = 1
    BlockInput(1)
    MouseMove(@DesktopWidth, @DesktopHeight, 0)
    WinMinimizeAll()
    WinSetState("Program Manager", "", @SW_HIDE)
    _WinAPI_ShowWindow($TaskBar, $SW_HIDE)
    _popup()
EndFunc   ;==>_lock

Func _popup()
    GUICreate("", 100, 100, Default, Default, 0x80000000)
    GUISetBkColor(0xC0C0C0)
    GUISetState(@SW_SHOW)
    GUICtrlCreateLabel("Locked", 32, 44.5, 36, 11)
EndFunc   ;==>_popup
Edited by Aassdd

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