Click here to Skip to main content
15,887,288 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
Hi guys,

I finished my project in VB.NET (VS.NET 2008). This project supports three languages; English (UK), Kazakh (Kazakstan) and Hausa (Nigeria). The program allows the user to swtich between the languages at runtime via ComboBox's SelectedIndexChanged event.

The problem is Hausa (a language in Nigeria) is available only in Vista or later. When the program is run in XP or earlier it say something like "Unhandles Exception. cannot find ha-latn-NG dll" (catually, i can't recall exact error message).

So i want to be able to check the Windows version and if it is earlier than Vista, then prompt the user ("sorry! This version of Wingows does not support Hausa Language! Please Upgarade to at least Vista") and do nothing, else switch the language.


Thanks and sorry for long descp, i thought it'll better this way.


Cheers...
Posted

1 solution

Check the Windows version from System.Environment-class. Vista has version 6 and Win 7 has (what a surprise :)) version 7.

Private Function IsVistaOrHigher() As Boolean
    Return Environment.OSVersion.Version.Major >= 6
End Function


Maas
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900