Posted: Sun Feb 04, 2007 1:36 pm
You should be able to block input with a hook.
http://www.purebasic.com
https://www.purebasic.fr/english/
Code: Select all
; PB4 : Netmaestro
tmw = FindWindow_(0,"Windows Task Manager")
If tmw
SendMessage_(tmw,#WM_CLOSE,0,0)
Delay(100)
EndIf
tmfilename.s = GetEnvironmentVariable("windir") + "\System32\taskmgr.exe"
tm = OpenFile_(tmfilename, @ofs.OFSTRUCT, #OF_SHARE_DENY_READ)
OpenWindow(0,0,0,320,240,"No Taskmanager!",$CF0001)
Repeat:Until WaitWindowEvent()=#WM_CLOSE
CloseHandle_(tm) Code: Select all
; PB4 : Netmaestro
; changed by ts-soft
tmw = FindWindow_(0,"Windows Task-Manager")
If tmw
SendMessage_(tmw,#WM_CLOSE,0,0)
Delay(100)
EndIf
SysDir.s{#MAX_PATH}
GetSystemDirectory_(@SysDir, #MAX_PATH)
tmfilename.s = SysDir + "\taskmgr.exe"
tm = OpenFile_(tmfilename, @ofs.OFSTRUCT, #OF_SHARE_DENY_READ)
OpenWindow(0,0,0,320,240,"No Taskmanager!",$CF0001)
Repeat:Until WaitWindowEvent()=#WM_CLOSE
CloseHandle_(tm)Code: Select all
Global q
Procedure doblock()
q=0
Repeat
BlockInput_(1)
Delay(500)
Until q=1
BlockInput_(0)
EndProcedure
thread=CreateThread(@doblock(),0)
Delay(5000)
q=1
WaitThread(thread)