窗口LOAD事件中加入代码:
this.dateTimePicker1.Format = DateTimePickerFormat.Custom;
this.dateTimePicker1.CustomFormat = " ";
在datetimepicker的valuechange事件中加入代码:
this.dateTimePicker1.Format = DateTimePickerFormat.Long;
this.dateTimePicker1.CustomFormat = null;
窗口LOAD事件中加入代码:
this.dateTimePicker1.Format = DateTimePickerFormat.Custom;
this.dateTimePicker1.CustomFormat = " ";
在datetimepicker的valuechange事件中加入代码:
this.dateTimePicker1.Format = DateTimePickerFormat.Long;
this.dateTimePicker1.CustomFormat = null;
本文标题:Winform设置datetimepicker默认为空
本文链接:https://www.haomeiwen.com/subject/qfnwzftx.html
网友评论