Option Explicit
Private Declare Function DllGetVersion Lib "Shlwapi.dll" (dwVersion As DllVersionInfo) As Long
Private Type DllVersionInfo
cbSize As Long '结构大小
dwMajorVersion As Long '主版本
dwMinorVersion As Long '次版本
dwBuildNumber As Long '创建数目
dwPlatformID As Long
End Type
Private Sub Form_Activate()
Print GetIEVersionString
End Sub
Private Function GetIEVersionString() As String
Dim DVI As DllVersionInfo
DVI.cbSize = Len(DVI)
Call DllGetVersion(DVI)
GetIEVersionString = "Internet Explorer " & _
DVI.dwMajorVersion & "." & _
DVI.dwMinorVersion & "." & _
DVI.dwBuildNumber
End Function