Blockinput_() problem
- DoubleDutch
- Addict

- Posts: 3220
- Joined: Thu Aug 07, 2003 7:01 pm
- Location: United Kingdom
- Contact:
You should be able to block input with a hook.
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
https://reportcomplete.com <- School end of term reports system
Matt,
I know it's C++, but maybe it could give you some ideas.
check these two links.
http://www.codeproject.com/vb/net/LockK ... ct=1751996
http://www.codeproject.com/system/preve ... ct=1611270
I know it's C++, but maybe it could give you some ideas.
check these two links.
http://www.codeproject.com/vb/net/LockK ... ct=1751996
http://www.codeproject.com/system/preve ... ct=1611270
-
thommy.oster
- New User

- Posts: 5
- Joined: Thu Mar 22, 2007 8:22 pm
- Location: NRW, Germany
Try this code from NetMaestro
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) In win9x, the sysdir isn't System32, and the code missing a "-"
"Windows Task-Manager" is correct
"Windows Task-Manager" is correct
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)PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

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)Now do as Tommy.Oster said and smack a check for task manager window in the thread

