One of the first things to understand is that culture information is maintained by the current Windows thread in the value of Thread.CurrentCulture. So to check for the culture in a given Windows environment, use this code ...
Imports System.Threading Public Class Form1 Private Sub Button1_Click( _ ByVal sender As System.Object, _ ByVal e As System.EventArgs) _ Handles Button1.Click MessageBox.Show( _ Thread.CurrentThread.CurrentCulture.ToString) End Sub End Class
On my computer, this gives a result of "en-US". If I change the value
to Slovenian in Windows XP, (Start > Control Panel > Date, Time,
Language and Regional Options > Regional and Language Options, the
program reports "sl-SI" instead.
To set the value of CurrentCulture to a given culture using
VB.NET, just assign the correct value. Technically, this creates a new,
neutral object and then assigns "Slovenian" to it. Since this only
affects the current thread, the culture settings of the computer aren't
changed.
VB was always a RAD tool and it was always user friendly for any type of
user whether professional or not. It also provided many users with
shortcuts and features which made this language popular among many
users. It had its share of debugging and maintenance issues of course.
Join MindStick Community
You need to log in or register to vote on answers or questions.
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy.
http://msdn.microsoft.com/en-us/library/system.globalization.cultureinfo%28v=vs.71%29.aspx
One of the first things to understand is that culture information is maintained by the current Windows thread in the value of Thread.CurrentCulture. So to check for the culture in a given Windows environment, use this code ...
On my computer, this gives a result of "en-US". If I change the value to Slovenian in Windows XP, (Start > Control Panel > Date, Time, Language and Regional Options > Regional and Language Options, the program reports "sl-SI" instead.
To set the value of CurrentCulture to a given culture using VB.NET, just assign the correct value. Technically, this creates a new, neutral object and then assigns "Slovenian" to it. Since this only affects the current thread, the culture settings of the computer aren't changed.
http://www.startvbdotnet.com/language/