请教各位大虾在WIN2000中如何屏蔽ctrl+alt+del

lxrhappy 2003-03-13 04:25:05
在WIN98中用SystemParametersInfo可以实现此功能,但在WIN2000中却不行?
...全文
58 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
yanlong 2003-03-30
  • 打赏
  • 举报
回复
不知道
zhenxizhou 2003-03-30
  • 打赏
  • 举报
回复
在2000下屏蔽Ctrl-Alt-Del例程 :
http://www.8421.org/download.php?id=163
GetWindowPos 2003-03-15
  • 打赏
  • 举报
回复
楼上的,你提供的是C代码,VB不能用
我也很想知道在2000里怎么屏蔽
佐罗XIII 2003-03-15
  • 打赏
  • 举报
回复
去:http://www.china-pub.com/computers/emook/1456/info.htm 你会得到满意的答案!
lxrhappy 2003-03-14
  • 打赏
  • 举报
回复
楼上的兄弟,这段代码也不行呀!我说的是在win2000中
foreverforyou 2003-03-14
  • 打赏
  • 举报
回复
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-Tab
Sub FastTaskSwitching(bEnabled As Boolean)
Dim X As Long, bDisabled As Long
bDisabled = Not bEnabled
X = SystemParametersInfo(97, bDisabled, CStr(1), 0)
End Sub
'禁止使用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


98-7-22 禁止 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)


lxrhappy 2003-03-14
  • 打赏
  • 举报
回复
这个东东我有,但不能实现我想要的功能,还有更好的方法吗?
dsclub 2003-03-13
  • 打赏
  • 举报
回复
win2k没有这样的api,
可以看看这个
http://www.applevb.com/sourcecode/sourcecode.htm

1,486

社区成员

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

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