private void btnMacro_Click(object sender, EventArgs e) { gBExtras.Controls.Add(cBScanCode); cBScanCode.Location = new Point(lBTip.Location.X, lBTip.Location.Y + lBTip.Size.Height); rb = new RecordBox(this) { TopLevel = false, Dock = DockStyle.Fill, Visible = true }; Controls.Add(rb); rb.BringToFront(); rb.FormClosed += delegate { Controls.Add(cBScanCode); cBScanCode.Location = oldSC; ActiveControl = lBMacroOn; rb = null; }; }
private void btnRecordMacro_Click(object sender, EventArgs e) { rb = new RecordBox(this) { TopLevel = true, FormBorderStyle = FormBorderStyle.FixedSingle }; rb.ShowDialog(); }