There is no a way to simply detect the language. The problem is: for example, Perso-Arabic script (
http://en.wikipedia.org/wiki/Persian_alphabet[
^]) is used by Persian, Arabic, and other languages. So, looking at the set of the Unicode code points does not help. To tell one language from another, you would need to have thesaurus for all languages in question, identify, say, separate words against thesaurus and perform statistical analysis. The situation with different often unrelated languages (Persian and Arabic are from two different language families) use the same writing system is rather typical: compare Russian and Mongolian (using Cyrillic), English and Vietnamese (using Latin)…
Even this, in general case, may not help, because, in some cases, the language is not hard to identify, but just because some texts does not have certain language. What to do if some person writes using the mixture or two or more languages? What to do if many words are misspelled?
Anyway, I hope I gave you in idea.
One final note: how can you talk about programming if you are using VB6. Do you think it was ever been a programming language? :-)
—SA