|
-
Nov 8th, 1999, 11:30 PM
#1
Thread Starter
Junior Member
Hi!
How can I find out which OS my users are running through VB6?
Thanks,
Olga
-
Nov 9th, 1999, 12:03 PM
#2
Guru
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
-
Nov 9th, 1999, 12:08 PM
#3
Thread Starter
Junior Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|