|
|
|
You don't need to call any Windows API function in VB.NET to determine which version of Windows your application is running on, because this information is exposed by the Environment.OSVersion property. For example, if you run this code under Windows 2000: |
then this is what appears in the console window: Microsoft Windows NT 5.0.2195.0
The OSVersion property returns a System.OperatingSystem object, which exposes a few properties of its own. For example, you can use its Platform property to quickly test whether you're under Windows 9x or Windows NT/2000/XP: |
You can even test individual portions of the Windows system number by means of the Major, Minor, Build, and Revision properties of the object returned by the Environment.OSVersion.Version property: |
|
|
|
Submitted By :
Nayan Patel
(Member Since : 5/26/2004 12:23:06 PM)
|
|
|
Job Description :
He is the moderator of this site and currently working as an independent consultant. He works with VB.net/ASP.net, SQL Server and other MS technologies. He is MCSD.net, MCDBA and MCSE. In his free time he likes to watch funny movies and doing oil painting. |
View all (893) submissions by this author
(Birth Date : 7/14/1981 ) |
|
|