Click here to Skip to main content
15,884,836 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to change date displayed in DateTimePicker to Arabic without the need to change region settings of Windows.
I tried the following code but it didn't work:
VB
Thread.CurrentThread.CurrentCulture = New CultureInfo("ar-EG")
Thread.CurrentThread.CurrentUICulture = New CultureInfo("ar-EG")

I also searched the web for a solution I found that DateTimePicker uses the local culture settings of the operating system and couldn't be changed using code.
Is this true? and if not how I could change its culture?

I'm using Visual Basic .Net 2010 and it is my first question in this great and very useful web site. I appreciate any help please.
Posted
Updated 28-Feb-12 3:06am
v2
Comments
André Kraak 28-Feb-12 9:10am    
Edited question:
Added pre tags
Formatted text/code
Spelling/Grammar

1 solution

It is not possible as stated in this KB[^].
KB states:
This behavior occurs because the DateTimePicker control and the MonthCalendar control are Microsoft Windows common controls. Therefore, the operating system's user locale determines the user interface of these controls.
 
Share this answer
 
Comments
Gregory Gadow 28-Feb-12 9:22am    
I thought you were being facetious by saying the fault was with them being Microsoft Windows common controls. Then I read the Knowledge Base article and saw that you quoted Microsoft itself. Five stars for making me shake my head at MS' cluelessness. And, of course, for your good answer.
André Kraak 28-Feb-12 10:33am    
Thanks.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900