|
|
|
|
|
Dicas
|
|
Visual Basic (Windows)
|
|
|
Título da Dica: Habilitar ou desabilitar o TaskManager, ou seja o CTRL + ALT + DEL
|
|
|
|
Postada em 11/2/2004 por PC
'isto deve ficar num module Declare Function SystemParametersInfo Lib "user32" Alias "SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam As Long, lpvParam As Any, ByVal fuWinIni As Long) As Long Public Const SCREENSAVERRUNNING = 97
'cole isto num form '--------------------------------------------------------------------------------------- ' Procedure : Desliga_Ctrl_Alt_Del ' DateTime : 16/01/2004 04:11 ' Author : Paulo Cezar Barbosa, www.sharmaq.com.br ' Purpose : Desliga o CTRL+ALT+DEL '--------------------------------------------------------------------------------------- ' Public Sub Desliga_Ctrl_Alt_Del() On Error Resume Next Dim lResult As Long Dim bBoolean As Boolean lResult = SystemParametersInfo(SCREENSAVERRUNNING, True, bBoolean, 0) End Sub
'--------------------------------------------------------------------------------------- ' Procedure : Liga_Ctrl_Alt_Del ' DateTime : 16/01/2004 04:11 ' Author : Paulo Cezar Barbosa, www.sharmaq.com.br ' Purpose : Ativa o CTRL+ALT+DEL '--------------------------------------------------------------------------------------- ' Public Sub Liga_Ctrl_Alt_Del() On Error Resume Next Dim lResult As Long Dim bBoolean As Boolean lResult = SystemParametersInfo(SCREENSAVERRUNNING, False, bBoolean, 0) End Sub
Private Sub Form_Load() 'esta linha desabilita Desliga_Ctrl_Alt_Del End Sub
Private Sub Form_Unload(Cancel As Integer) 'Esta linha Habilita Liga_Ctrl_Alt_Del End Sub
Atenção não funciona com o Windows 2000 e XP
|
|
|
|
|