/// <summary> /// 实例重玩按钮 /// </summary> void againGameButton() { againGameButton cw = new againGameButton(); cw.MouseDown += againGameClickIncident; this.Controls.Add(cw); }
private void Form1_Load(object sender, EventArgs e) { mineSite lc = new mineSite(); againGameButton cw = new againGameButton(); this.Controls.Add(lc); this.Size = new Size(lc.Size.Width + 100, lc.Size.Height + 80); this.Location = new Point(760, 240);//大致居中 }