I'm having a problem with this:
Private Function Get_NT_Version()
Dim NT As Decimal = CDec(System.Environment.OSVersion.Version.ToString.Substring(0, 3))
MsgBox(NT)
Return NT
End Function
I'm running on Win7 so I want to obtain this value as decimal or double: "6.1" but what I get is this: "61"
This is what I want to do:
If Get_NT_Version() < 6.0 Then
msgbox("This application only works with an Aero compatible windows version")
Application.Exit()
end if
UPDATE:
Tried this idea too but returns a "61"
Dim s As Double = String.Format("{0}.{1}", System.Environment.OSVersion.Version.ToString.Split(".")(0), System.Environment.OSVersion.Version.ToString.Split(".")(1))
I found the solution using VAL:
Simple as that!