获取机器DirectX版本

来源:互联网 发布:巴以问题的由来知乎 编辑:程序博客网 时间:2024/04/29 05:48
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 160x600, 创建于 08-4-23MSDN */google_ad_slot = "4367022601";google_ad_width = 160;google_ad_height = 600;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
'引用windows scripting host object model
Private Sub Form_Load()
Dim regwsh, Value, DValue, temp As String
Set regwsh = New IWshShell_Class
DValue = regwsh.RegRead("HKLMSOFTWAREMICROSOFTDirectXInstalledVersion")
Value = regwsh.RegRead("HKLMSOFTWAREMICROSOFTDirectXVersion")
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<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 160x600, 创建于 08-4-23MSDN */google_ad_slot = "4367022601";google_ad_width = 160;google_ad_height = 600;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>