Jump to content

How to hide taskbar?


Aassdd
 Share

Recommended Posts

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.

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
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...