Private Declare Function GetVersionEx Lib "kernel32" Alias "GetVersionExA" (lpVersionInformation As OSVERSIONINFO) As Long
Private Type OSVERSIONINFO
dwOSVersionInfoSize As Long
dwMajorVersion As Long
dwMinorVersion As Long
dwBuildNumber As Long
dwPlatformId As Long
szCSDVersion As String * 128 ' Maintenance string for PSS usage
End Type
Private Sub Form_Load()
Me.Show
Dim xx As OSVERSIONINFO
'在正式调用函数之前,必须先将这个结构的dwOSVersionInfoSize字段设为结构的大小(148)
xx.dwOSVersionInfoSize = 148
GetVersionEx xx
Print xx.dwBuildNumber
Print xx.dwMajorVersion
Print xx.dwMinorVersion
Print xx.dwOSVersionInfoSize
Print xx.dwPlatformId
Print xx.szCSDVersion
End Sub
可根据print值很好的做判断
另附Windows版本和IE版本以及32位和64位操作系统信息
http://blog.csdn.net/chenjl1031/article/details/6320254