C# ToolStrip 控件的动态生成


            ToolStrip toolStrip = new ToolStrip();
            toolStrip.Location = new System .Drawing.Point(e.Location.X-100,e.Location.Y);
            toolStrip.Width = 100;
            toolStrip.Height = 30;
            toolStrip.BackColor = Color.Yellow;
            toolStrip.Dock = DockStyle.None;
            toolStrip.Click += toolStrip_Click;
            this.Controls.Add(toolStrip);

你可能感兴趣的:(C#)