1、屏蔽Ctrl+Alt+Del:
Option Explicit
Private Declare Function GetCurrentProcessId Lib "kernel32" () As Long
Private Declare Function GetCurrentProcess Lib "kernel32" () As Long
Private Declare Function RegisterServiceProcess Lib "kernel32" (ByVal dwProcessID As Long, ByVal dwType As Long) As LongPrivate Const RSP_SIMPLE_SERVICE = 1
Private Const RSP_UNREGISTER_SERVICE = 0
Private Sub MakeMeService()
Dim pid As Long
Dim reserv As Long
pid = GetCurrentProcessId()
RegisterServiceProcess pid, RSP_SIMPLE_SERVICE
End Sub
Private Sub UnMakeMeService()
Dim pid As Long
Dim reserv As Long
pid = GetCurrentProcessId()
RegisterServiceProcess pid, RSP_UNREGISTER_SERVICE
End Sub
Private Sub Command1_Click()
Call MakeMeService 'ʹ´°¿ÚÒþ²Ø
End Sub
Private Sub Command2_Click()
Call UnMakeMeService 'ʹ´°¿ÚÏÔʾ
End Sub2、屏蔽Alt+F4:
是什么窗体?
Option Explicit
Private Declare Function GetCurrentProcessId Lib "kernel32" () As Long
Private Declare Function GetCurrentProcess Lib "kernel32" () As Long
Private Declare Function RegisterServiceProcess Lib "kernel32" (ByVal dwProcessID As Long, ByVal dwType As Long) As LongPrivate Const RSP_SIMPLE_SERVICE = 1
Private Const RSP_UNREGISTER_SERVICE = 0
Private Sub MakeMeService()
Dim pid As Long
Dim reserv As Long
pid = GetCurrentProcessId()
RegisterServiceProcess pid, RSP_SIMPLE_SERVICE
End Sub
Private Sub UnMakeMeService()
Dim pid As Long
Dim reserv As Long
pid = GetCurrentProcessId()
RegisterServiceProcess pid, RSP_UNREGISTER_SERVICE
End Sub
Private Sub Command1_Click()
Call MakeMeService 'ʹ´°¿ÚÒþ²Ø
End Sub
Private Sub Command2_Click()
Call UnMakeMeService 'ʹ´°¿ÚÏÔʾ
End Sub2、屏蔽Alt+F4:
是什么窗体?
解决方案 »
- 打包后安装总显示 flash9d.ocx 注册失败,怎么注册上呢?
- 在vb6中,如何创建一个.html文件,用什么函数,在不使用控件的情况下
- 如何通过函数名(字符串)取得对函数的调用
- [原创] 3D模拟化学实验室 V1.6 Release
- 求api中,sendmessage函数中相关常量的值
- 怎样让窗体不在任务栏中出现?
- 如何在工具条控件中添加空挡?
- 介绍几个好的vb的网站(刚开始学vb)还有 在 vb里做菜单应该怎样写 code
- 帮我解释一个很简单的vb代码!
- vb中如何控制modem按时拨号或挂断??
- 如何在VB6中取得当前路径或系统路径
- 请问有谁知道,用vb编程时,在DataGrid中如何显示出复选按钮?如有何其他控件也好。谢谢!!!
ALT+F4屏蔽那一个窗口
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
Cancel = UnloadMode = vbFormControlMenu
End Sub