private void AddDTPtoToolstrip( n)
{
DateTimePicker dtp = DateTimePicker;
dtp.Width = 110;
dtp.Format = DateTimePickerFormat.Custom;
ToolStripControlHost host1 = ToolStripControlHost(dtp);
toolStrip1.Items.Insert(n, host1);
}
得到 DateTimePicker 值:
toolStrip1.Items[0].Text.; //得到index = 0Control控件值