程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 編程語言 >> Visual Basic語言 >> VB6 >> Check開機方式及Mouse Buttons個數

Check開機方式及Mouse Buttons個數

編輯:VB6
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
  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved