怎样才能拒绝ctrl+alt+del的事件

format 2000-08-10 02:49:00
加精
小弟请求各位大哥帮忙谢谢!!!!!!!!!!!!!!!!
...全文
121 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
tanyx 2001-06-21
  • 打赏
  • 举报
回复
恐怕WINDOWS NT 上无效吧?
shines77 2000-08-10
  • 打赏
  • 举报
回复
关注
  • 打赏
  • 举报
回复
///////////////////////////////////////
// add the following code to you project
///////////////////////////////////////
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

Private Const SPI_SCREENSAVERRUNNING = 97
Private Sub Command1_Click()
Dim ret As Integer
Dim pOld As Boolean

If Command1.Caption = "屏蔽" Then '使Ctrl+Alt+Del有效
ret = SystemParametersInfo(SPI_SCREENSAVERRUNNING, True, pOld, 0)
Command1.Caption = "有效"
Else '使Ctrl+Alt+Del无效
ret = SystemParametersInfo(SPI_SCREENSAVERRUNNING, False, pOld, 0)
Command1.Caption = "屏蔽"
End If
End Sub

Private Sub Form_Load()
Command1.Caption = "屏蔽"
End Sub

Private Sub Form_Unload(Cancel As Integer)
Dim ret As Integer
Dim pOld As Boolean

'退出前使ALT+CTL+DEL有效
ret = SystemParametersInfo(SPI_SCREENSAVERRUNNING, False, pOld, 0)
End Sub

7,759

社区成员

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

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