vb.net DateTimePicker默认值可以为空吗?
3个回答
展开全部
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
DateTimePicker1.Format = DateTimePickerFormat.Custom
DateTimePicker1.CustomFormat = " "
End Sub
Private Sub DateTimePicker1_CloseUp(ByVal sender As Object, ByVal e As System.EventArgs) Handles DateTimePicker1.CloseUp
DateTimePicker1.Format = DateTimePickerFormat.Long
End Sub
End Class
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
DateTimePicker1.Format = DateTimePickerFormat.Custom
DateTimePicker1.CustomFormat = " "
End Sub
Private Sub DateTimePicker1_CloseUp(ByVal sender As Object, ByVal e As System.EventArgs) Handles DateTimePicker1.CloseUp
DateTimePicker1.Format = DateTimePickerFormat.Long
End Sub
End Class
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
要实现为空,请把DateTimePicker的CheckBox显示出来,未选中(Checked=False)就表示是空的,选中才能值,
效果应该能实现你的要求.
效果应该能实现你的要求.
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
DateTimePicker默认值必须是一个确定的日期
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询