private DateTimePicker dtp = new DateTimePicker();//这里实例化一个DateTimePicker控件
private void N_HC_JHCJUserControl_Load(object sender, EventArgs e)
{
//向toolStrip控件中添加 日期 控件
dtp.Width = 110;
dtp.Format = DateTimePickerFormat.Custom;
dtp.CustomFormat = "yyyy年MM月dd日";
ToolStripControlHost host1 = new ToolStripControlHost(dtp);
toolStrip1.Items.Insert(0, host1);
}
private void N_HC_JHCJUserControl_Load(object sender, EventArgs e)
{
//向toolStrip控件中添加 日期 控件
dtp.Width = 110;
dtp.Format = DateTimePickerFormat.Custom;
dtp.CustomFormat = "yyyy年MM月dd日";
ToolStripControlHost host1 = new ToolStripControlHost(dtp);
toolStrip1.Items.Insert(0, host1);
}