home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.Form Form1
- Caption = "Form1"
- ClientHeight = 8460
- ClientLeft = 3555
- ClientTop = 2460
- ClientWidth = 6690
- Height = 8865
- Left = 3495
- LinkTopic = "Form1"
- ScaleHeight = 8460
- ScaleWidth = 6690
- Top = 2115
- Width = 6810
- Attribute VB_Name = "Form1"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- Option Explicit
- Private Type OSVERSIONINFO
- dwOSVersionInfoSize As Long
- dwMajorVersion As Long
- dwMinorVersion As Long
- dwBuildNumber As Long
- dwPlatformId As Long
- szCSDVersion As String * 128
- End Type
- ' dwPlatformId defines:
- Private Const VER_PLATFORM_WIN32s = 0
- Private Const VER_PLATFORM_WIN32_WINDOWS = 1
- Private Const VER_PLATFORM_WIN32_NT = 2
- Private Declare Function GetVersionEx Lib "kernel32" _
- Alias "GetVersionExA" _
- (lpVersionInformation As OSVERSIONINFO) As Long
- Private Sub Form_Load()
- Dim v As OSVERSIONINFO
- v.dwOSVersionInfoSize = Len(v)
- GetVersionEx v
- MsgBox "Major Version = " & v.dwMajorVersion
- MsgBox "Minor Version = " & v.dwMinorVersion
- MsgBox "Build Number = " & v.dwBuildNumber
- If v.dwPlatformId = VER_PLATFORM_WIN32s Then MsgBox "Win32s"
- If v.dwPlatformId = VER_PLATFORM_WIN32_WINDOWS Then MsgBox "Windows"
- If v.dwPlatformId = VER_PLATFORM_WIN32_NT Then MsgBox "Windows NT"
- End Sub
-