在VB中如何屏蔽Ctrl+Alt+Del键?

xmh 2000-07-12 08:53:00
加精
请各位高手解答?
...全文
381 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
tony_ren 2001-08-27
  • 打赏
  • 举报
回复
好像不用这么复杂吧,我看过书,用三个函数就可以了。
tanyx 2001-01-25
  • 打赏
  • 举报
回复
当然有意义,其意义就是骗别人的口令。
anhongcsdn 2001-01-13
  • 打赏
  • 举报
回复
在windows nt 中屏蔽Crtl+Alt+Del有意义吗?
hunterzhang 2000-12-20
  • 打赏
  • 举报
回复
在Windows nt中能不能屏蔽Ctrl+Alt+Del键?
xmh 2000-07-16
  • 打赏
  • 举报
回复
在Windows nt中能不能屏蔽Ctrl+Alt+Del键?
Linhan 2000-07-13
  • 打赏
  • 举报
回复
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
自定义函数在Form_Load事件中调用即可
Sub DisableCtrlAltDelete(Flags As Boolean)
' Disables Control Alt Delete Breaking as well as Ctrl-Escape
Dim X As Long
X = SystemParametersInfo(97, Flags, CStr(1), 0)
End Sub
bluewater 2000-07-12
  • 打赏
  • 举报
回复
禁用Ctrl-Alt-Del
Private Declare Function EnableWindow Lib "user32" (ByVal hWnd As
Integer, ByVal aBOOL As Integer) As Integer
Private Declare Function IsWindowEnabled Lib "user32" (ByVal hWnd As
Integer) As Integer
Private Declare Function GetMenu Lib "user32" (ByVal hWnd As Integer) As
Integer
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (
ByVal lpClassName As String, ByVal lpWindowName As String) As Long
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 TaskBarhWnd As Long
Private IsTaskBarEnabled As Integer
Private TaskBarMenuHwnd As Integer
'禁止使用Ctrl-Alt-Del
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
'允许使用Ctrl-Alt-Del
Public Sub EnableTaskBar()
If IsTaskBarEnabled = 0 Then
IsTaskBarEnabled = EnableWindow(TaskBarhWnd, 1)
End If
End Sub
'禁止 Ctrl+Alt+Del
' 声明(For Win95):
Const SPI_SCREENSAVERRUNNING = 97
Private Declare Function SystemParametersInfo Lib "user32" Alias "
SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam As Long,
lpvParam As Any, ByVal fuWinIni As Long) As Long
使用:
'禁止
Dim pOld As Boolean
Call SystemParametersInfo(SPI_SCREENSAVERRUNNING, True, pOld, 0)
'开启
Dim pOld As Boolean
Call SystemParametersInfo(SPI_SCREENSAVERRUNNING, False, pOld, 0)
zzj_mjz 2000-07-12
  • 打赏
  • 举报
回复
关注

7,759

社区成员

发帖
与我相关
我的任务
社区描述
VB 基础类
社区管理员
  • VB基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧