VB.NET Check Operating System(OS) Version

‘ This code checks if the OS is at least Windows XP

If Environment.OSVersion.Version <> New Version(5, 1) Then

Dim style As MsgBoxStyle = MsgBoxStyle.OkOnly Or MsgBoxStyle.Critical

MsgBox(“Windows XP required.”, style, “Incompatible Operating System”)

Return

End If