Beispiel #1
0
        private void Monitor_Click(object sender, EventArgs e)
        {
            MonitorForm monitor = sender as MonitorForm;

            FormContainer.Controls.SetChildIndex(monitor, 0);
            monitor.Activate();
        }
Beispiel #2
0
        private void OpenMonitor(string portName)
        {
            MonitorForm monitor = new MonitorForm(portName)
            {
                TopLevel = false
            };

            monitor.MinimizeBox = false;
            monitor.Closing    += Monitor_Closing;
            monitor.Click      += Monitor_Click;
            monitor.Resize     += Monitor_Resize;

            PositionForm(monitor);

            if (FormContainer.Controls.Count <= 0)
            {
                monitor.WindowState = FormWindowState.Maximized;
            }

            FormContainer.Controls.Add(monitor);
            monitor.Show();

            FormContainer.Controls.SetChildIndex(monitor, 0);
            monitor.Activate();
        }