Post by Deleted on Jun 10, 2015 2:16:42 GMT 10
The application that I'm working on needs to work different OS's. For example the glass effect that I have posted inside This is a very simple, and easy way to check the OS name. If Microsoft did not have 6 different version of each major release. Then this would have not been necessary.
VB.NET Code
Dim Full_Os_Name As String = My.Computer.Info.OSFullName Dim User_Os As String Sub Get_OS_NAME() If Full_Os_Name.Contains("Windows 7") Then User_Os = "Windows 7" ElseIf Full_Os_Name.Contains("Windows Vista")Then User_Os = "Windows Vista" ElseIf Full_Os_Name.Contains("Windows XP")Then User_Os = "Windows XP" Else MessageBox.Show(Full_Os_Name & " is not supported by: " & My.Application.Info.ProductName & ", Version " & My.Application.Info.Version.ToString) Application.Exit() End If End Sub Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Get_OS_Name() End Sub
Now you only have to compare "Windows 7", for example without comparing Windows Stater, Ultimate, Professional, Super Ultimate, Ultimate X2, and, Ultimate V5. You get the point. If You Like It Please Follow Me.
|
|