1
我與一些代碼玩網絡,並試圖在我的項目下列禁用默認訪問絲帶的MS Access啓動屬性
Sub DisableStartupProperties()
ChangeProperty "StartupShowDBWindow", dbBoolean, False
ChangeProperty "StartupShowStatusBar", dbBoolean, False
ChangeProperty "AllowBuiltinToolbars", dbBoolean, False
ChangeProperty "AllowFullMenus", dbBoolean, False
ChangeProperty "AllowBreakIntoCode", dbBoolean, False
ChangeProperty "AllowSpecialKeys", dbBoolean, False
ChangeProperty "AllowBypassKey", dbBoolean, False
ChangeProperty "AllowShortcutMenus", dbBoolean, False
End Sub
Function ChangeProperty(strPropName As String, _
varPropType As Variant, varPropValue As Variant) As Integer
Dim dbs As Database, prp As Property
Const conPropNotFoundError = 3270
Set dbs = CurrentDb
On Error GoTo Change_Err dbs.Properties(strPropName) = varPropValue ChangeProperty = True
Change_Bye:
Exit Function
Change_Err:
If Err = conPropNotFoundError Then
Set prp = dbs.CreateProperty(strPropName, varPropType, varPropValue)
dbs.Properties.Append prp
Resume Next
Else
ChangeProperty = False
Resume Change_Bye
End If
End Function
我設置一個旁路移鍵控代碼在窗體上,但我沒有將其設置爲我打開應用程序時加載的第一個表單。有什麼辦法可以繞過這個並返回到我的應用程序?