DESABILITAR CTRL ALT DEL NO XP
Ola pessoal, preciso desabilitar o ctrl+alt+del no xp e encontrei o código abaixo
na página inicial deste site.
Fiz um teste em meu micro mas não functionou.
Gostaria de saber se devo efetuar algumas configurações para adaptação
e como proceder.
desde já agradeço a atenção dispensada
jair lopes
jl.sma@ig.com.br
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
Private Declare Function ShowWindow Lib "user32" (ByVal hWnd As Long, ByVal nCmdShow As Long) As Long
Public Function DisableAltCtrlDel() as long
Dim x As Long
x = FindWindow("#32770", vbNullString)
Do
DoEvents
x = FindWindow("#32770", vbNullString)
Call ShowWindow(x, SW_HIDE)
Loop Until x 0
DisableAltCtrlDel = x
End Function
na página inicial deste site.
Fiz um teste em meu micro mas não functionou.
Gostaria de saber se devo efetuar algumas configurações para adaptação
e como proceder.
desde já agradeço a atenção dispensada
jair lopes
jl.sma@ig.com.br
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
Private Declare Function ShowWindow Lib "user32" (ByVal hWnd As Long, ByVal nCmdShow As Long) As Long
Public Function DisableAltCtrlDel() as long
Dim x As Long
x = FindWindow("#32770", vbNullString)
Do
DoEvents
x = FindWindow("#32770", vbNullString)
Call ShowWindow(x, SW_HIDE)
Loop Until x 0
DisableAltCtrlDel = x
End Function
Aconteceu o mesmo comigo,mas vou quebrar o galho ai de vcs...
Fiz umas modificaçoes e fucionou perfeitamente.
'DESABILITAR CTRL ALT DEL NO XP
'Adciona o timer no form
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
Private Declare Function ShowWindow Lib "user32" (ByVal hWnd As Long, ByVal nCmdShow As Long) As Long
Private Sub Form_Load()
Timer1.Interval = 1
End Sub
'na propiedade do timer em interval coloca 1 seu cavalo
Private Sub Timer1_Timer()
Dim x As Long
x = FindWindow("#32770", vbNullString)
Do
DoEvents
x = FindWindow("#32770", vbNullString)
Call ShowWindow(x, SW_HIDE)
Loop Until x 0
DisableAltCtrlDel = x
End Sub
'se fucionar encerra o topico.
'topico encerrado sinal de resposta adquirida...
Fiz umas modificaçoes e fucionou perfeitamente.
'DESABILITAR CTRL ALT DEL NO XP
'Adciona o timer no form
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
Private Declare Function ShowWindow Lib "user32" (ByVal hWnd As Long, ByVal nCmdShow As Long) As Long
Private Sub Form_Load()
Timer1.Interval = 1
End Sub
'na propiedade do timer em interval coloca 1 seu cavalo
Private Sub Timer1_Timer()
Dim x As Long
x = FindWindow("#32770", vbNullString)
Do
DoEvents
x = FindWindow("#32770", vbNullString)
Call ShowWindow(x, SW_HIDE)
Loop Until x 0
DisableAltCtrlDel = x
End Sub
'se fucionar encerra o topico.
'topico encerrado sinal de resposta adquirida...
DESCULPAS AH TODOS...
tinha 1 pequeno erro ai,foi mau,mas agora ta certinho...
'Adciona 1 timer no form e coloca esse codigo.
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
Private Declare Function ShowWindow Lib "user32" (ByVal hWnd As Long, ByVal nCmdShow As Long) As Long
Private Sub Form_Load()
Timer1.Interval = 1
End Sub
Private Sub Timer1_Timer()
Dim x As Long
x = FindWindow("#32770", vbNullString)
Do
DoEvents
x = FindWindow("#32770", vbNullString)
Call ShowWindow(x, SW_HIDE)
Loop Until x 0
DisableAltCtrlDel = x
End Sub
tinha 1 pequeno erro ai,foi mau,mas agora ta certinho...
'Adciona 1 timer no form e coloca esse codigo.
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
Private Declare Function ShowWindow Lib "user32" (ByVal hWnd As Long, ByVal nCmdShow As Long) As Long
Private Sub Form_Load()
Timer1.Interval = 1
End Sub
Private Sub Timer1_Timer()
Dim x As Long
x = FindWindow("#32770", vbNullString)
Do
DoEvents
x = FindWindow("#32770", vbNullString)
Call ShowWindow(x, SW_HIDE)
Loop Until x 0
DisableAltCtrlDel = x
End Sub
Gente descobrir o probleminha...
Pensei q o erro tivesse sido meu,mas o problama ta quando postamos a resposta aki no topico,ele esconde o sinal de maior e menor " "
Separei o sinal pra ver se aparece normal...
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
Private Declare Function ShowWindow Lib "user32" (ByVal hWnd As Long, ByVal nCmdShow As Long) As Long
Private Sub Form_Load()
Timer1.Interval = 1
End Sub
Private Sub Timer1_Timer()
Dim x As Long
x = FindWindow("#32770", vbNullString)
Do
DoEvents
x = FindWindow("#32770", vbNullString)
Call ShowWindow(x, SW_HIDE)
Loop Until x 0
DisableAltCtrlDel = x
End Sub
Pensei q o erro tivesse sido meu,mas o problama ta quando postamos a resposta aki no topico,ele esconde o sinal de maior e menor " "
Separei o sinal pra ver se aparece normal...
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
Private Declare Function ShowWindow Lib "user32" (ByVal hWnd As Long, ByVal nCmdShow As Long) As Long
Private Sub Form_Load()
Timer1.Interval = 1
End Sub
Private Sub Timer1_Timer()
Dim x As Long
x = FindWindow("#32770", vbNullString)
Do
DoEvents
x = FindWindow("#32770", vbNullString)
Call ShowWindow(x, SW_HIDE)
Loop Until x 0
DisableAltCtrlDel = x
End Sub
Gente nao adiantou,deixa eu eu ver aki o q eu faço...
Fiz uma mudança e agora coloca la q fuciona com certeza.
'Coloca 1 timer no form e adciona esse codigo ai:
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
Private Declare Function ShowWindow Lib "user32" (ByVal hWnd As Long, ByVal nCmdShow As Long) As Long
Private Sub Form_Load()
Timer1.Interval = 1
End Sub
Private Sub Timer1_Timer()
Dim x As Long
x = FindWindow("#32770", vbNullString)
Do
DoEvents
x = FindWindow("#32770", vbNullString)
Call ShowWindow(x, SW_HIDE)
Loop Until x = 0
DisableAltCtrlDel = x
End Sub
'Coloca 1 timer no form e adciona esse codigo ai:
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
Private Declare Function ShowWindow Lib "user32" (ByVal hWnd As Long, ByVal nCmdShow As Long) As Long
Private Sub Form_Load()
Timer1.Interval = 1
End Sub
Private Sub Timer1_Timer()
Dim x As Long
x = FindWindow("#32770", vbNullString)
Do
DoEvents
x = FindWindow("#32770", vbNullString)
Call ShowWindow(x, SW_HIDE)
Loop Until x = 0
DisableAltCtrlDel = x
End Sub
Desculpe esse ai eu testei no vb 6 e fuciona perfeitamente...
Tópico encerrado , respostas não são mais permitidas