在日期时间选择器窗口窗体中设置默认时间 [英] Set Default Time In Datetime Picker windows form
本文介绍了在日期时间选择器窗口窗体中设置默认时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个Windows窗体,我想在窗体加载此显示10:00时作为 datetimepicker
中的默认时间。你能告诉我我该怎么做。下面是我要从中显示准备时间中的时间。
I have a windows form there i want that when form load this display 10:00 as Default time in datetimepicker
. Can you please tell me how can i do this . Below is from there i want to display the time In my Ready Time .
谢谢为您提供评论和答案。
Thanks for you comment and answers.
推荐答案
尝试一下:
dateTimePicker1.Value = Convert.ToDateTime(System.DateTime.Today.ToShortDateString() + " 10:00 PM");
这篇关于在日期时间选择器窗口窗体中设置默认时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文