'引用windows scripting host object model
Private Sub Form_Load()
Dim regwsh, Value, DValue, temp As String
Set regwsh = New IWshShell_Class
DValue = regwsh.RegRead("HKLM\SOFTWARE\MICROSOFT\DirectX\InstalledVersion")
Value = regwsh.RegRead("HKLM\SOFTWARE\MICROSOFT\DirectX\Version")
For i = LBound(DValue) To UBound(DValue)
temp = temp & DValue(i)
Next i
MsgBox "您机器DirectX版本为 :" & vbCrLf & "DirectX " & Mid(temp, 4, 1) & "." & _ Right(temp, 1) & "(" & Value & ")"
Set regwsh = Nothing
End Sub
文章来源于领测软件测试网 https://www.ltesting.net/
版权所有(C) 2003-2010 TestAge(领测软件测试网)|领测国际科技(北京)有限公司|软件测试工程师培训网 All Rights Reserved
北京市海淀区中关村南大街9号北京理工科技大厦1402室 京ICP备2023014753号-2
技术支持和业务联系:info@testage.com.cn 电话:010-51297073