Hi NG !
I set the CurrentCulture and the CurrentUICulture at the start of my
app using this code:
string sUICulture =
System.Configuration.ConfigurationSettings.AppSett ings["UICulture"];
if (sUICulture != null) {
CultureInfo cultInfo = new CultureInfo(sUICulture);
Thread.CurrentThread.CurrentUICulture = cultInfo;
Thread.CurrentThread.CurrentCulture = cultInfo;
}
That fine, all my UI text appears according the settings in the
app.config. But in one case, I handle an event of a related system. (At
the moment no synchronisation is done). This code runs with the culture
settings of the System. (That's OK, because i did not synchronize). Now
I would like to check if Invoke is required (InvokeRequired). But this
does not work. The value is set to true, but if I debug the project,
the code within the if clause would not be executed. Why ?
In this state of execution it is possible to retrieve the
CurrentUICulture for the thread, but after an aditional call of a
function, it is neither possible the get the UICulture from the thread,
nor from the System. Why? What could go wrong ?
Thanks
Marcel 1 2385
I'm sorry my fault I just have the following problem:
I set the CurrentCulture and the CurrentUICulture at the start of my
app using this code:
string sUICulture =
System.Configuration.ConfigurationSettings.AppSett ings["UICulture"];
if (sUICulture != null) {
CultureInfo cultInfo = new CultureInfo(sUICulture);
Thread.CurrentThread.CurrentUICulture = cultInfo;
Thread.CurrentThread.CurrentCulture = cultInfo;
}
That fine, all my UI text appears according the settings in the
app.config. But in one case, I handle an event of a related system. (At
the moment no synchronisation is done). This code runs with the culture
settings of the System. (That's OK, because i did not synchronize).
In this state of execution it is possible to retrieve the
CurrentUICulture for the thread, but after an additional call of a
function, it is neither possible the get the UICulture from the thread,
nor from the System. Why? What could go wrong ?
schaf schrieb:
Hi NG !
I set the CurrentCulture and the CurrentUICulture at the start of my
app using this code:
string sUICulture =
System.Configuration.ConfigurationSettings.AppSett ings["UICulture"];
if (sUICulture != null) {
CultureInfo cultInfo = new CultureInfo(sUICulture);
Thread.CurrentThread.CurrentUICulture = cultInfo;
Thread.CurrentThread.CurrentCulture = cultInfo;
}
That fine, all my UI text appears according the settings in the
app.config. But in one case, I handle an event of a related system. (At
the moment no synchronisation is done). This code runs with the culture
settings of the System. (That's OK, because i did not synchronize). Now
I would like to check if Invoke is required (InvokeRequired). But this
does not work. The value is set to true, but if I debug the project,
the code within the if clause would not be executed. Why ?
In this state of execution it is possible to retrieve the
CurrentUICulture for the thread, but after an aditional call of a
function, it is neither possible the get the UICulture from the thread,
nor from the System. Why? What could go wrong ?
Thanks
Marcel
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: GM |
last post by:
Hi,
My application has a need to cache a number of shared reference lists
containing basic business objects. In order to improve performance these
lists are fetched and updated in the...
|
by: Jedrzej Miadowicz |
last post by:
I have a problem when using ISynchronizeInvoke.BeginInvoke with polymorphic
parameters. It seems that if I try to call BeginInvoke and in the array of
parameters place an object that's derived from...
|
by: Tom Dacon |
last post by:
I'm raising an event in a component, using ISynchronizeInvoke.Invoke, and my
event args object contains a string as one of its members. If the string is
longer than 63 bytes, the Invoke call pulls...
|
by: Tim Murray |
last post by:
Hi,
I am creating a multithreaded server application in
Managed C++. Each client that connects to the server will
be running on their own thread to process their input.
They all need to share...
|
by: Wavemaker |
last post by:
One of the things I've struggled with from time to time is handling
events raised on different threads. For example, an object could be
listening to events from one or more objects running in...
| |
by: JezB |
last post by:
How do I programatically set the culture at session level ?
|
by: Thai Mai Shu |
last post by:
What is wrong with my call below. If I change the
delegate and the CallBackComplete function to not take in
parameters then the .Invoke call works fine. As soon as I
put the parameters back I...
|
by: jherl |
last post by:
I am getting an "Object reference not set to an instance of an object"
when I try to execute the Invoke method. I have it set up as follows:
---
Private _syncObject As...
|
by: Mike9900 |
last post by:
Hello,
I want to view the calendar in another culture, for example let it show in
Arabic. I use this code in the Main, but the calendar is still in the same
culture:
CultureInfo sa = new...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |