private void button1_Click(object sender, EventArgs e) { myToolStrip.SuspendLayout(); myToolStrip.Items.Add(new ToolStripButton("New Button")); myToolStrip.ResumeLayout(); myToolStrip.PerformLayout(); }
private void Form1_Resize(object sender, EventArgs e) { myToolStrip.SuspendLayout(); myToolStrip.Items.Add(new ToolStripButton("New Button")); myToolStrip.ResumeLayout(); myToolStrip.PerformLayout(); }The package library for the System.Windows.Forms.ToolStrip PerformLayout method is the .NET Framework Class Library, which is included with the Microsoft .NET Framework.