flat assembler
Message board for the users of flat assembler.
Index
> Windows > How can I prevent ALT-TAB and CTRL_ESC? |
Author |
|
cod3b453 08 Jul 2006, 23:08
I'm not sure, but SetWindowsHookEx might work.
Sorry I can't say for sure, but I've never used it to trap keystrokes. HTH |
|||
08 Jul 2006, 23:08 |
|
coconut 09 Jul 2006, 01:49
using a hook you can trap all except ctrl + alt + del i think. search the boards for one of my example posts. another member had posted a better one too. my example worked only on nt systems, not win9x though
|
|||
09 Jul 2006, 01:49 |
|
coconut 09 Jul 2006, 01:58
here are the examples:
http://board.flatassembler.net/topic.php?t=2130 http://board.flatassembler.net/topic.php?t=1670 |
|||
09 Jul 2006, 01:58 |
|
revolution 09 Jul 2006, 12:11
Thanks for the tips cod3b453 and coconut.
However the WH_KEYBOARD hook works for the Windows key but fails for CTRL-ESC and ALT-TAB. There must be a way to do it? |
|||
09 Jul 2006, 12:11 |
|
coconut 09 Jul 2006, 13:54
did you try wh_keyboard_ll
|
|||
09 Jul 2006, 13:54 |
|
revolution 09 Jul 2006, 15:02
Quote: did you try wh_keyboard_ll |
|||
09 Jul 2006, 15:02 |
|
Reverend 09 Jul 2006, 15:26
I found some old source which disabled the CTRL+ALT+DEL sequence but only under win9x:
Code: invoke SystemParametersInfo, SPI_SCREENSAVERRUNNING, 1, 1, 0 ; disables CTRL+ALT+DEL invoke SystemParametersInfo, SPI_SCREENSAVERRUNNING, 0, 1, 0 ; enables CTRL+ALT+DEL Quote: SPI_SCREENSAVERRUNNING Windows 95 only: Used internally; applications should not use this flag. |
|||
09 Jul 2006, 15:26 |
|
revolution 10 Jul 2006, 07:51
Reverend wrote: disabled the CTRL+ALT+DEL |
|||
10 Jul 2006, 07:51 |
|
white_wight 10 Jul 2006, 15:37
Use WS_EX_TOOLWINDOW extended style.
Or, if you want the taskbar not being used at all, you could FindWindow it with class name 'Shell_TrayWnd', and then SW_HIDE it. |
|||
10 Jul 2006, 15:37 |
|
cod3b453 10 Jul 2006, 19:27
The problem is those key combinations will probably be filtered by windows, so I can only suggest that you create an app window without a close option and create a hotkey CTRL+ALT+[KEY] that is the only way to stop the program.
|
|||
10 Jul 2006, 19:27 |
|
revolution 10 Jul 2006, 23:06
white_wight wrote: WS_EX_TOOLWINDOW extended style. |
|||
10 Jul 2006, 23:06 |
|
white_wight 12 Jul 2006, 22:56
Quote: The only thing left to do is to disable the keyboard functions for switching to other tasks. So you're might be writing some kind of alternative shell (the default shell for Win is explorer.exe), then you have only to change it in your registry. Save this: Code: Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon] "Shell"="C:\\Path\\To\\Your.exe" as whatever.reg and execute. After reboot the system will use your program as a shell. |
|||
12 Jul 2006, 22:56 |
|
revolution 13 Jul 2006, 00:36
Quote: So you're might be writing some kind of alternative shell |
|||
13 Jul 2006, 00:36 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.