想偷懒吧
http://www.5xsoft.com/data/200108/2109205401_2.htm这是判断操作系统的类'The Class get the systeminfo
Private strMajorVer As String
Private strMinorVer As String
Private sngOSBuild As Single
Private strOSPlatform As StringPrivate Declare Function GetVersionEx Lib "kernel32" _
Alias "GetVersionExA" (lpOSInfo As OSVERINFO) As BooleanPrivate Type OSVERINFO ' Operating System Version Information
OSVerInfoSize As Long
MajorVer As Long
MinorVer As Long
BuildNo As Long
PlatformId As Long
strReserved As String * 128
End TypePublic Property Get MajorVer() As String
MajorVer = strMajorVer
End Property
Public Property Get MinorVer() As String
MinorVer = strMinorVer
End PropertyPublic Property Get OSBuild() As Single
OSBuild = sngOSBuild
End Property
Public Property Get OSPlatform() As String
OSPlatform = strOSPlatform
End PropertyPrivate Sub Class_Initialize()' Really all the work is done here
' It makes all the API calls
' Getting version info
Dim OSInfo As OSVERINFO
OSInfo.OSVerInfoSize = Len(OSInfo)If GetVersionEx(OSInfo) Then
strMajorVer = OSInfo.MajorVer
strMinorVer = OSInfo.MinorVer
sngOSBuild = OSInfo.BuildNo And &HFFFF&
strOSPlatform = OSInfo.PlatformId
End IfEnd Sub
http://www.5xsoft.com/data/200108/2109205401_2.htm这是判断操作系统的类'The Class get the systeminfo
Private strMajorVer As String
Private strMinorVer As String
Private sngOSBuild As Single
Private strOSPlatform As StringPrivate Declare Function GetVersionEx Lib "kernel32" _
Alias "GetVersionExA" (lpOSInfo As OSVERINFO) As BooleanPrivate Type OSVERINFO ' Operating System Version Information
OSVerInfoSize As Long
MajorVer As Long
MinorVer As Long
BuildNo As Long
PlatformId As Long
strReserved As String * 128
End TypePublic Property Get MajorVer() As String
MajorVer = strMajorVer
End Property
Public Property Get MinorVer() As String
MinorVer = strMinorVer
End PropertyPublic Property Get OSBuild() As Single
OSBuild = sngOSBuild
End Property
Public Property Get OSPlatform() As String
OSPlatform = strOSPlatform
End PropertyPrivate Sub Class_Initialize()' Really all the work is done here
' It makes all the API calls
' Getting version info
Dim OSInfo As OSVERINFO
OSInfo.OSVerInfoSize = Len(OSInfo)If GetVersionEx(OSInfo) Then
strMajorVer = OSInfo.MajorVer
strMinorVer = OSInfo.MinorVer
sngOSBuild = OSInfo.BuildNo And &HFFFF&
strOSPlatform = OSInfo.PlatformId
End IfEnd Sub
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货