WinForm ToolStrip添加DateTimePicker日历控件

前端之家收集整理的这篇文章主要介绍了WinForm ToolStrip添加DateTimePicker日历控件前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

Vb.Net:

'有DateTimePicker事件时定义
Private WithEvents dtp As New DateTimePicker
'无DateTimePicker事件时定义
Dim dtp As New DateTimePicker


dtp.Format = DateTimePickerFormat.Short
Controls.Add(dtp)
Me.ToolStrip1.Items.Insert(1,New ToolStripControlHost(dtp))

图示:

原文链接:https://www.f2er.com/vb/261566.html

猜你在找的VB相关文章