Get OS Version in VB.NET
So our first code post is a simple one – but could be useful. So if you’re developing a Visual Basic application and need to know which version of operating system the user has, you can do it with the following code:
Public Function OSVersion() As String
Example of how this could be used:
You could pull back the OS version using the above string. Feed the result into more VB code and use an IF statement to make certain features available depending on which version of Windows the user has.