说三道四技术文摘-感悟人生的经典句子
说三道四 > 文档快照

禁止使用 Alt-Tab 或 Ctrl-Alt-Del -VB资料

HTML文档下载 WORD文档下载 PDF文档下载
禁止使用 Alt-Tab 或 Ctrl-Alt-Del -VB资料

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

禁止 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)
Agent Dash游戏设计之美:如何用2D打造3D体验? 开源项目文档应规避的13处“硬伤” 李开复:Graph Search将可与谷歌搜索媲美 月成本3500美元 如何在AWS上实现BBVA信用卡低延时分析 外媒眼中的国内互联网巨头:服务器集群庞大但缺乏创新 asp.net如何调用com组件 急!急!急!如何判断对象指针是否有效? 汇编和VC混合编成的问题 求:学生考试系统的源程序 高手请进,如何实现同时进行录音和播放,急!!! 如何实现对一个XML文件的遍历 将两副图片放入EXE文件中怎样将两副全部读出? 怎样申请域名 请问如何制作VS.NET风格的菜单? 什么是万湖会议? 要用等式的性质解!等式的性质! 2-1/4x=3 跟据等式的性质 数学中在什么情况下用抽签法、随机数表法、分层抽样法 分层抽样的优却点是什么?同上 简便算法2002÷2002又2002/2003 2002除以2002又2003分之2002怎样用简 独享体罚之秘密阅读答案读了第六段老师给我们留下了怎 计算1.98加一个一位小数时,由于错误的只把数的末 明年起电视购物广告禁\"叫卖式\"夸经济观察:“宽带中国”战略遭遇三重困卫计委公布打击非法行医专项行动各地举李某某案二审因上诉人更换辩护律师将延隆国强:上海自贸区金融政策细则不宜仓名家点金《横冲直撞好莱坞》免费看!妈妈带一岁宝宝听“龙舟说唱”攻读德国博士学位到底有多难?时髦漂亮的日本校服冲冠一怒为红颜落宅的双身少女农家小郡主白色的青春物语重生空间之田园归处河桥古镇旅游法海寺旅游五泉山旅游凤城望海楼旅游豫西大峡谷旅游
备案号:鲁ICP备13029499号-2 说三道四 www.s3d4.cn 说三道四技术文摘