我想更改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];
但仍有问题: - (
答案 0 :(得分:0)
С更改Culture
的{{1}}:
Thread