ShortdateFormat of application changes if run as Administrator
I have a VB.net application that has datagridviews and date control in windows forms. I have the short date format set in the date controls and short date format is some columns of the datagridview.
If I run the application on server 2008 it picks up the wrong short date format. I have the server 2008 regional settings as "en-AU" but for some reason the app picks up en-US as the current culture.
If I run the app as the Administrator it seems to pick up the proper culture.
Can anyone give me a reason as to why it could be doing that?
I tried setting the locale manually by doing
Dim c As Globalization.CultureInfo = New Globalization.CultureInfo(_Culture)
System.Threading.T开发者_运维问答hread.CurrentThread.CurrentCulture = c
System.Threading.Thread.CurrentThread.CurrentUICulture = c
But the same results.
Regards, Dasith
What if you specifically set the culture?
Dim c As System.Globalization.CultureInfo = New System.Globalization.CultureInfo("en-US", False)
That goes in the _Load sub of your main form.
精彩评论