获取VIP特权
首页 > 模板攻略 > 其他 > 有关ADP禁止SHIFT键的方法代码概述

2019-10-16 11:46:43

0已点赞

有关ADP禁止SHIFT键的方法代码概述



Function DisableBypassADP(blnYesNo As Boolean)
CurrentProject.Properties.Add "AllowByPassKey", blnYesNo
End Function

然后在启动时调用 DisableBypassADP(false)

更详细的做法:

Function SetMyProperty(MyPropName As String, MyPropvalue As Variant) As Boolean
On Error GoTo SetMyProperty_In_Err
Dim Ix As Integer
With CurrentProject.Properties
If fn_PropertyExist(MyPropName) Then 'check if it already exists
For Ix = 0 To .Count - 1
If .Item(Ix).Name = MyPropName Then
.Item(Ix).value = MyPropvalue
End If
Next Ix
Else
.Add MyPropName, MyPropvalue
End If
End With
SetMyProperty = True

SetMyProperty_Exit:
Exit Function

SetMyProperty_In_Err:

MsgBox "设置属性出错:", Err, Error$
SetMyProperty = False
Resume SetMyProperty_Exit

End Function
'--------检查属性是否存在---
Private Function fn_PropertyExist(MyPropName As String) As Boolean
fn_PropertyExist = False
Dim Ix As Integer
With CurrentProject.Properties
For Ix = 0 To .Count - 1
If .Item(Ix).Name = MyPropName Then
fn_PropertyExist = True
Exit For
End If
Next Ix
End With
End Function
 

Public Function setByPass()
SetMyProperty "AllowBypassKey", True
End Function

如果帮到您!点个赞吧!

相关模板

3秒登陆,即可下载

注册即同意《我拉网服务使用协议》&《我拉网隐私政策》

QQ

QQ

邮箱

电话

提交

手机绑定

绑定手机号,账户更安全

中国 +86

手机号格式错误

按住滑块,拖拽到最右边
>>

验证码错误

温馨提示:微信绑定手机号,手机端也可以登录,我拉网将对用户隐私信息给予严格保密。

取消