Members

Technology Zones

IBM Learning Center

Articles

Hosted By

MaximumASP

Info

Rated
Read 68,289 times

Related Categories

How to disable Ctrl+Alt+Del - How to disable/enable

Abdul

How to disable/enable

This simple code shows you how to disable/enable the "ctrl, alt, del" keys so the user cannot quite the program which is currently running..

I have created a sub. Use the true statement if you want to disable the keys like thia:

a = disablekeys (true)

use the false statement if you want to enable the keys like this:

a = disablekeys (false)


Place two commandbuttons on the form and name them "enablek", disablek"
Now add the following code:

Private Declare Function SystemParametersInfo Lib "user32" Alias "SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam As Long, ByVal lpvParam As Any, ByVal fuWinIni As Long) As Long


Private Sub disablekeys(disable As Boolean)
SystemParametersInfo 97, disable, CStr(1), 0
End Sub


Private Sub disablek_Click()
disablekeys True
End Sub

Private Sub enablek_Click()
disablekeys False
End Sub

Comments

  • how to disable Ctrl-Alt-Del, alt-tab

    Posted by Alex001 on 19 Mar 2005

    try this out
    [url="http://www.meliorasoft.com/kits/keyboard/"]KeyboardControl SDK[/url]

  • how to disable Ctrl-Alt-Del, alt-tab and Window k

    Posted by dnalor on 13 Mar 2005

    can someone help me how to disable Ctrl-Alt-Del, alt-tab and Window key on windows xp visual basic program...

  • ??

    Posted by -=D=- on 06 Dec 2003

    can it use for winxp??

  • Posted by CyberLynx on 18 Sep 2003

    Thanks for the input HyperHacker...it's given me some new things to investigate. Thank You. :)

  • Posted by HyperHacker on 15 Sep 2003

    Depends what your app is doing. In WinXP I've found that with a fullscreen always-on-top app, if Task Manager is already running in the tray (which can be done by running it with the vbhide parameter ...