|
-
Jan 30th, 2000, 02:17 AM
#1
Thread Starter
Registered User
Who knows how get what is the OS, then I'll create 3 functions:
IsWin95(); IsWin98(); IsWinNt()
Jefferson
Thanks in advance.
-
Jan 30th, 2000, 03:03 AM
#2
PowerPoster
-
Jan 30th, 2000, 04:53 AM
#3
Junior Member
-
Jan 30th, 2000, 05:02 AM
#4
Addicted Member
-
Jan 30th, 2000, 07:19 AM
#5
PowerPoster
The kind folks at VB World have added a Smilies legend so you can see what keys make what face..it's here
http://www.vb-world.net/ubb/smilies.html
Have fun!
-
Jan 30th, 2000, 08:27 AM
#6
Addicted Member
-
Jan 30th, 2000, 10:23 AM
#7
Thread Starter
Registered User
-
Jan 30th, 2000, 10:49 AM
#8
-
Jan 30th, 2000, 05:25 PM
#9
Frenzied Member
This is the function I use;
'in declarations
Global Const Windows95 As Integer = 95
Global Const Windows98 As Integer = 98
Global Const WindowsNT3 As Integer = 3 'v3.51
Global Const WindowsNT4 As Integer = 4
Public Function OperatingSystem() As Integer
Dim OSInfo As OSVersionInfo
Dim RetValue As Integer
OSInfo.dwOSVersionInfoSize = 148
OSInfo.szCSDVersion = Space$(128)
RetValue = GetVersionExA(OSInfo)
With OSInfo
Select Case .dwPlatformId
Case 1
If .dwMinorVersion = 0 Then
OperatingSystem = Windows95
ElseIf .dwMinorVersion = 10 Then
OperatingSystem = Windows98
End If
Case 2
If .dwMajorVersion = 3 Then
OperatingSystem = WindowsNT3
ElseIf .dwMajorVersion = 4 Then
OperatingSystem = WindowsNT4
End If
Case Else
OperatingSystem = 0
End Select
End With
End Function
I think this was 'borrowed' from the MSDN CD.. it's good because you can do stuff like
If OperatingSystem=Windows95 Then...
------------------
Mark "Buzby" Beeton
VB Developer
[email protected]
-
Jan 30th, 2000, 05:26 PM
#10
Frenzied Member
Ooops - forgot the API decs;
Private Declare Function GetVersionExA Lib "kernel32" (lpVersionInformation As OSVersionInfo) As Integer
Private Type OSVersionInfo
dwOSVersionInfoSize As Long
dwMajorVersion As Long
dwMinorVersion As Long
dwBuildNumber As Long
dwPlatformId As Long
szCSDVersion As String * 128
End Type
------------------
Mark "Buzby" Beeton
VB Developer
[email protected]
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
|