下面的程序员大本营中可能有。

解决方案 »

  1.   

    这是<<程序员大本营>>里的源码
    $?禁止使用 Alt-Tab 或 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'禁止或允许使用 Alt-TabSub FastTaskSwitching(bEnabled As Boolean)Dim X As Long, bDisabled As LongbDisabled = Not bEnabledX = SystemParametersInfo(97, bDisabled, CStr(1), 0)End Sub'禁止使用Ctrl-Alt-DelPublic Sub DisableTaskBar()Dim EWindow As IntegerTaskBarhWnd = FindWindow("Shell_traywnd", "")If TaskBarhWnd <> 0 ThenEWindow = IsWindowEnabled(TaskBarhWnd)If EWindow = 1 Then IsTaskBarEnabled = EnableWindow(TaskBarhWnd, 0)End IfEnd IfEnd Sub'允许使用Ctrl-Alt-DelPublic Sub EnableTaskBar()If IsTaskBarEnabled = 0 ThenIsTaskBarEnabled = EnableWindow(TaskBarhWnd, 1)End IfEnd Sub禁止 Ctrl+Alt+Del     声明(For Win95):Const SPI_SCREENSAVERRUNNING = 97Private 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 BooleanCall SystemParametersInfo(SPI_SCREENSAVERRUNNING, True, pOld, 0)'开启Dim pOld As BooleanCall SystemParametersInfo(SPI_SCREENSAVERRUNNING, False, pOld, 0)