Results 1 to 3 of 3

Thread: Which Operating System is running

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jan 1999
    Location
    Scarsdale, NY
    Posts
    26

    Post

    Hi!

    How can I find out which OS my users are running through VB6?

    Thanks,

    Olga

  2. #2
    Guru Yonatan's Avatar
    Join Date
    Apr 1999
    Location
    Israel
    Posts
    892

    Post

    Code:
    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
    
    
    Private Declare Function GetVersionEx Lib "kernel32" Alias "GetVersionExA" (lpVersionInformation As OSVERSIONINFO) As Long
    
    
    Private Const VER_PLATFORM_WIN32s = 0
    Private Const VER_PLATFORM_WIN32_WINDOWS = 1
    Private Const VER_PLATFORM_WIN32_NT = 2
    
    
    Private Sub Form_Load()
        Dim OVI As OSVERSIONINFO
        AutoRedraw = True
        OVI.dwOSVersionInfoSize = Len(OVI)
        Call GetVersionEx(OVI)
        Print "You are running Windows ";
        Select Case OVI.dwPlatformId
        Case VER_PLATFORM_WIN32s
            Print "3.11 with 32-bit support"
        Case VER_PLATFORM_WIN32_WINDOWS
            Print "95/98"
        Case VER_PLATFORM_WIN32_NT
            Print "NT"
        End Select
    End Sub
    ------------------
    Yonatan
    Teenage Programmer
    E-Mail: [email protected]
    ICQ: 19552879



  3. #3

    Thread Starter
    Junior Member
    Join Date
    Jan 1999
    Location
    Scarsdale, NY
    Posts
    26

    Post

    Thank you so much, Yonatan!!!!!
    Exactly what I wanted!!!!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width