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