CSDN博客

img yinweihong

获取机器DirectX版本

发表于2004/5/28 10:25:00  1143人阅读

分类: 其他

'引用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

0 0

相关博文

我的热门文章

img
取 消
img