Click to See Complete Forum and Search --> : [RESOLVED] New thread change culture
Marraco
January 15th, 2009, 10:35 AM
I had set, in program properties>application>assembly information, English-United States as neutral culture, and my program start with
My.Application.ChangeCulture("en-US")
but each time I start a new thread, it automatically changes his culture to Spanish-Argentina, and Cdbl("0.2") converts to 20 instead of 0.2
żis there a way to avoid it?
Marraco
January 15th, 2009, 10:40 AM
I had set, in program properties>application>assembly information, English-United States as neutral culture, and my program start with
My.Application.ChangeCulture("en-US")
but each time I start a new thread, it automatically changes his culture to Spanish-Argentina, and Cdbl("0.2") converts to 20 instead of 0.2
żis there a way to avoid it?
I had set this:
Dim ParalellProcess As New Thread(AddressOf LoopPrincipal)
With ParalellProcess
.IsBackground = True
.CurrentCulture = My.Application.Culture
.Start()It looks like working, altought I don't know if is correct coding.
dglienna
January 15th, 2009, 07:53 PM
Here's a sample app.config setting...
<section name="SettingsAndResources.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=*****" allowExeDefinition="MachineToLocalUser" />
Marraco
January 16th, 2009, 07:37 AM
Here's a sample app.config setting...
<section name="SettingsAndResources.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=*****" allowExeDefinition="MachineToLocalUser" />maybe app.config is a C# file. (I have not found that file).
I found dozens designer-generated-code lines looking as your posted. Too many to risk broke something by hand editing. It should be a control in some place to change it.
Do you think that new threads should not have the main application culture, or it is a bug?
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.