datetimepicker control 
Author Message
 datetimepicker control

i set the Thread.CurrentThread.CurrentCulture to "en-GB" in my window
application before InitializeComponent() therefore the date and currency
format will follow the British culture. i learn this from MSDN's
article. But in the datetimepicker control i placed in the form, the
current date display below the datetimepicker control always display the
US style date. After that i found that it based on my computer regional
setting and not my culture setting. how do i make it follow my culture
setting instead of regional setting? since i set the culture, it should
follow my setting, right? can anybody help me?

*** Sent via Developersdex http://www.*-*-*.com/ ***
Don't just participate in USENET...get rewarded for it!



Sat, 28 May 2005 20:34:51 GMT  
 datetimepicker control
Hi Khor,

The DateTimePicker class actually encapsulates the corresponding Windows
Common control. Therefore, Thread.CurrentThread.CurrentCulture doesn't
affect it. You can try P/Invoke SetThreadLocale or SetLocaleInfo to solve
this problem.

Hope this helps.

Best Regards,
Leo Chen

This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------

| X-Newsreader: AspNNTP 1.50 (ActionJackson.com)
| Subject: datetimepicker control
| Mime-Version: 1.0
| Content-Type: text/plain; charset="us-ascii"
| Content-Transfer-Encoding: 7bit

| Newsgroups: microsoft.public.dotnet.languages.CSharp
| Date: Tue, 10 Dec 2002 04:34:51 -0800
| NNTP-Posting-Host: actionjackson37.dsl.frii.net 216.17.146.37
| Lines: 1        
| Path: cpmsftngxa06!tkmsftngp01!TK2MSFTNGP12
| Xref: cpmsftngxa06 microsoft.public.dotnet.languages.csharp:115293
| X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
|
| i set the Thread.CurrentThread.CurrentCulture to "en-GB" in my window
| application before InitializeComponent() therefore the date and currency
| format will follow the British culture. i learn this from MSDN's
| article. But in the datetimepicker control i placed in the form, the
| current date display below the datetimepicker control always display the
| US style date. After that i found that it based on my computer regional
| setting and not my culture setting. how do i make it follow my culture
| setting instead of regional setting? since i set the culture, it should
| follow my setting, right? can anybody help me?
|
|
|
| *** Sent via Developersdex http://www.developersdex.com ***
| Don't just participate in USENET...get rewarded for it!
|



Mon, 30 May 2005 17:02:16 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. DateTimePicker control?

2. DateTimePicker control question

3. Crashes when using DateTimePicker control

4. DateTimePicker control problem.

5. datetimepicker control

6. DateTimePicker Control

7. Please help with DateTimePicker control

8. DATETIMEPICKER control

9. User-drawn Control Like DateTimePicker

10. ATL Windowing Question regarding DateTimePicker & ActiveX control

11. DateTimePicker and maxdate

12. DateTimePicker value to string

 

 
Powered by phpBB® Forum Software