更改DateTimePicker控件的语言

时间:2013-02-26 09:07:21

标签: c# .net

我想更改DateTimePicker控件的语言。为此,我在DateTimePicker控件的DropDown事件上更改了区域语言,但它对DateTimePicker控件没有影响。代码是

private void dtpDate_DropDown(object sender, EventArgs e)
{
    System.Globalization.CultureInfo ci = new   System.Globalization.CultureInfo("fr-FR");
    System.Threading.Thread.CurrentThread.CurrentCulture = ci;
}

我也试过这个

dtpDate.Format = DateTimePickerFormat.Custom;
string[] formats = dtpDate.Value.GetDateTimeFormats(Application.CurrentCulture);
dtpDate.CustomFormat = formats[0]; 

但仍有问题: - (

1 个答案:

答案 0 :(得分:0)

С更改Culture的{​​{1}}:

Thread