2

How can I Disabled CTRL-ALT-DEL, ALT-TAB and Start Menu using this code. The code below is disabled ALT + F4.

public class AltF4Filter : IMessageFilter
{
    public bool PreFilterMessage(ref Message m)
    {
        const int WM_SYSKEYDOWN = 0x0104;
        if (m.Msg == WM_SYSKEYDOWN)
        {
            bool alt = ((int)m.LParam & 0x20000000) != 0;
            if (alt && (m.WParam == new IntPtr((int)Keys.F4)))
                return true; //pang disabled ng alt f4                
        }
        return false;
    }
}
NIMISHAN
  • 1,265
  • 4
  • 20
  • 29
Dreamer XD
  • 208
  • 3
  • 15
  • 2
    please don't do that – Rufus L Mar 04 '15 at 05:38
  • Guess that's for some presentation computer? Use group policies of the operating system to achieve your goal – Florian Schmidinger Mar 04 '15 at 05:45
  • 1
    You won't be able to disable Ctrl-Alt-Delete. That particular combination of keystrokes is part of the SAS (Secure Attention Sequence). The only way to over ride that is to write your own [Gina.DLL (Graphical Identification and Authentication)](http://en.wikipedia.org/wiki/Graphical_identification_and_authentication). As Florian mentions, there are policies in the OS that can disable that. – Icemanind Mar 04 '15 at 05:52
  • @Icemanind GINA is only supported in XP and older, Vista and newer now uses Credential Providers specifically to make it so you can no longer intercept the SAS.. – Scott Chamberlain Mar 04 '15 at 05:55
  • Hello guys how can I disabled during run time of my solution ? – Dreamer XD Mar 04 '15 at 06:17

0 Answers0