Option Explicit
Private Declare Function GetSystemMetrics Lib "user32" _
(ByVal nIndex As Long) As Long
Const SM_CLEANBOOT = 67
Private Sub Command1_Click()
Select Case GetSystemMetrics(SM_CLEANBOOT)
Case 1: Label1 = "安全模式."
Case 2: Label1 = "支持网络的安全模式."
Case Else: Label1 = "Windows运行在普通模式."
End Select
End Sub
点击Command1就可以看到Windows是以何种方式启动的。
延伸阅读
文章来源于领测软件测试网 https://www.ltesting.net/