禁止 Ctrl + Alt + Del
'声明(For Win95):
Private 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)
Private Sub Command1_Click()
Dim pOld As Boolean
Call SystemParametersInfo(SPI_SCREENSAVERRUNNING, True, pOld, 0)
End Sub
Private Sub Command2_Click()
Dim pOld As Boolean
Call SystemParametersInfo(SPI_SCREENSAVERRUNNING, False, pOld, 0)
End Sub
'设置Form.BorderStyle=0 自动屏蔽Ctrl-Break and Alt-F4
Private Sub Command3_Click()
Form1.BorderStyle = 0
End Sub
Private Sub Command4_Click()
Form1.BorderStyle = 2
End Sub