Check开机方式及Mouse Buttons个数


原始来源:  cww


Private Declare Function GetSystemMetrics Lib "user32" (ByVal nIndex As Long) As Long
Const SM_CMOUSEBUTTONS = 43
Const SM_CLEANBOOT = 67

Private Sub Form_Load()
Dim mode As Long
Dim NumbButtons As Long
mode = GetSystemMetrics(SM_CLEANBOOT)
Select Case mode
 Case 1
   Debug.Print "The System is in Safe Mode"
 Case 2
   Debug.Print "Fail-safe with network boot"
 Case 0
   Debug.Print "Normal Mode"
End Select
NumbButtons = GetSystemMetrics(SM_CMOUSEBUTTONS)
Debug.Print "Number of Mouse Buttons :"; NumbButtons
End Sub