static void ControlPanelThreadProc() { System.Diagnostics.Debug.WriteLine(String.Format("{0} is threadID {1}", System.Threading.Thread.CurrentThread.Name, System.Threading.Thread.CurrentThread.ManagedThreadId)); _controlPanel = new ControlPanelForm(); _controlPanel.StartPosition = FormStartPosition.Manual; _controlPanel.ShowInTaskbar = false; Application.Run(_controlPanel); System.Diagnostics.Debug.WriteLine("ControlPanel Thread is exiting"); }
private void InventoryForm_Load(object sender, EventArgs e) { this.WindowState = FormWindowState.Maximized; //Show MAC and IP Text = String.Format("IP = {0}, Serial = {1}", Program.IP, Program.SerialNumber); //Third Step (Attach to Form) AttachCallback(true); ControlPanelForm.LaunchControlPanel(this); }
protected override void OnMove(EventArgs e) { base.OnMove(e); ControlPanelForm.SetResize(new Point(this.Location.X + this.Width, this.Location.Y), this.Height); }
protected override void OnDeactivate(EventArgs e) { base.OnDeactivate(e); ControlPanelForm.SetTopMost(false); }
protected override void OnActivated(EventArgs e) { base.OnActivated(e); ControlPanelForm.SetTopMost(true); }
protected override void OnClosed(EventArgs e) { base.OnClosed(e); ControlPanelForm.CloseControlPanel(); }