获取机器DirectX版本

[入库:2005年8月18日] [更新:2007年3月24日]

本文简介:选择自 yinweihong 的 blog

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

本文关键:DirectX wsh
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top