'Reference windows scripting host object modelPrivate Sub Form_Load () Dim regwsh, Value, DValue, temp As StringSet regwsh = New IWshShell_ClassDValue = 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 Imsgbox" Your machine DirectX version is: "& Vbcrlf &" DirectX "& MID (Temp , 4, 1) & "." & Right (TEMP, 1) & "(" & Value & ")" set regwsh = nothingend sub