IEのバージョン取得 <TOP>
インターネットエクスプローラのバージョンを取得します。Windows Me, 2000以降か、IE5以降
Version5、Version6はこれで取得できたのですが・・(IE7β版はこれでは取得できません)レジストリから取得した方が良いようです。
DllGetVersion Shell32.dllのバージョン取得
私のメイン機(WinsowsXP)での例 Windows98のIEバージョンでの例
参照
'================================================================ '= IEのバージョン取得
'= (DllGetVersion.bas) '================================================================ #include "Windows.bi" #define DLLVER_PLATFORM_WINDOWS &H1 'Windows 95 #define DLLVER_PLATFORM_NT &H2 'Windows NT Type DllVersionInfo cbSize As Long dwMajorVersion As Long dwMinorVersion As Long dwBuildNumber As Long dwPlatformID As Long End Type Declare Function Api_DllGetVersion& Lib "shlwapi" Alias "DllGetVersion" (dwVersion As DllVersionInfo) Var Shared Bitmap As Object Var Shared Text1 As Object Text1.Attach GetDlgItem("Text1") : Text1.SetFontSize 14 BitmapObject Bitmap '================================================================ '= '================================================================ Declare Function GetIEVersionString() As String Function GetIEVersionString() As String Var Ret As Long Var DVI As DllVersionInfo DVI.cbSize = Len(DVI) Ret = Api_DllGetVersion(DVI) GetIEVersionString = "Version " & Trim$(Str$(DVI.dwMajorVersion)) & "." & Trim$(Str$(DVI.dwMinorVersion)) & "." & Trim$(Str$(DVI.dwBuildNumber)) End Function '================================================================ '= '================================================================ Declare Sub MainForm_Start edecl () Sub MainForm_Start() Bitmap.LoadFile "IELogo.bmp" DrawBitmap Bitmap,10,10 Bitmap.DeleteObject Text1.SetWindowText GetIEVersionString End Sub '================================================================ '= '================================================================ While 1 WaitEvent Wend Stop End