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.
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.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
If you like it, please vote my rep is struggling.![]()






Reply With Quote