|
-
Jun 19th, 2000, 09:29 AM
#1
Thread Starter
Lively Member
this code doesn't work or either it's in the wrong order.
I put this code in my for to disable ctrl alt del
I put this in the declorations part of my app
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
I put this in the form
Sub DisableCtrlAltDelete(bDisabled As Boolean)
Dim X As Long
X = SystemParametersInfo(97, bDisabled, CStr(1), 0)
End Sub
Call DisableCtrlAltDelete(True)
but it doesn't disable ctrl alt delete and ctrl esc and I got the code from the site section.
Timbudtwo
I have no life, only one with computers.
VB 6.0 Enterprise Edition
[hr]
-
Jun 19th, 2000, 09:52 AM
#2
Addicted Member
This code should work
Code:
'Windows API/Global Declarations
Public TaskBarhWnd As Long
Public IsTaskBarEnabled As Integer
Public TaskBarMenuHwnd As Integer
'This goes in a Module
Declare Function EnableWindow Lib "user32" (ByVal hwnd As Long, ByVal fEnable As Long) As Long
Declare Function IsWindowEnabled Lib "user32" (ByVal hwnd As Long) As Long
Declare Function GetMenu Lib "user32" (ByVal hwnd As Long) As Long
Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
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
'***********************************************************
'Make 2 command buttons
Sub FastTaskSwitching(bEnabled As Boolean)
Dim X As Long, bDisabled As Long
bDisabled = Not bEnabled
X = SystemParametersInfo(97, bDisabled, CStr(1), 0)
End Sub
Public Sub DisableTaskBar()
Dim EWindow As Integer
TaskBarhWnd = FindWindow("Shell_traywnd", "")
If TaskBarhWnd <> 0 Then
EWindow = IsWindowEnabled(TaskBarhWnd)
If EWindow = 1 Then
IsTaskBarEnabled = EnableWindow(TaskBarhWnd, 0)
End If
End If
End Sub
Public Sub EnableTaskBar()
If IsTaskBarEnabled = 0 Then
IsTaskBarEnabled = EnableWindow(TaskBarhWnd, 1)
End If
End Sub
Private Sub Command1_Click()
DisableTaskBar
FastTaskSwitching False
End Sub
Private Sub Command2_Click()
EnableTaskBar
FastTaskSwitching True
End Sub
-Lumin
-
Jun 19th, 2000, 10:09 AM
#3
Thread Starter
Lively Member
I really suck
ok i'm so despret i'm willing to send my form to someone to place in a ctrl alt del and ctrl esc disable code into it then have them send it back. If your willing to (and want to or be nice enough to) please send me your e-mail address and i'll send you the form.
Timbudtwo
I have no life, only one with computers.
VB 6.0 Enterprise Edition
[hr]
-
Jun 19th, 2000, 10:16 AM
#4
Addicted Member
I'll give it a try 
my e-mail is.
[email protected]
-Lumin
-
Jun 19th, 2000, 11:20 AM
#5
Addicted Member
Done
check your e-mail 
-Lumin
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|