窗口LOAD事件中加入代码:
this.dateTimePicker1.Format = DateTimePickerFormat.Custom;
this.dateTimePicker1.CustomFormat = " ";
在datetimepicker的valuechange事件中加入代码:
this.dateTimePicker1.Format = DateTimePickerFormat.Long;
this.dateTimePicker1.CustomFormat = null;
网友评论