System.Windows.Forms.Control.BringToFront()

Here are the examples of the csharp api class System.Windows.Forms.Control.BringToFront() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

200 Examples 7

1. Example

Project: MapleShark
Source File: SplitViewControl.cs
View license
private void Horizontal_MouseDown(object sender, MouseEventArgs e)
        {
            Action = SizeAction.SizeH;
            StartPos = new Point(e.X, e.Y);
            Horizontal.BringToFront();
            Horizontal.BackColor = SystemColors.ControlDark;
            FirstTime = true;
        }

2. Example

Project: MapleShark
Source File: SplitViewControl.cs
View license
private void Vertical_MouseDown(object sender, MouseEventArgs e)
        {
            Action = SizeAction.SizeV;
            StartPos = new Point(e.X, e.Y);
            Vertical.BringToFront();
            Vertical.BackColor = SystemColors.ControlDark;
            FirstTime = true;
        }

3. Example

Project: MapleShark
Source File: SplitViewControl.cs
View license
private void Center_MouseDown(object sender, MouseEventArgs e)
        {
            Action = SizeAction.SizeA;
            StartPos = new Point(e.X, e.Y);
            Vertical.BringToFront();
            Horizontal.BringToFront();
            Vertical.BackColor = SystemColors.ControlDark;
            Horizontal.BackColor = SystemColors.ControlDark;
            FirstTime = true;
        }

4. Example

Project: WsdlUI
Source File: uc_PanelInfo.cs
View license
public void Clear()
        {
            _childControl = new Panel();
            _childControl.Parent = this;
            _childControl.Dock = DockStyle.Fill;
            _childControl.BringToFront();
        }

5. Example

Project: WsdlUI
Source File: uc_PanelInfo.cs
View license
public void DispayControl(Control childControl)
        {
            childControl.Parent = this;
            childControl.Dock = DockStyle.Fill;

            _childControl = childControl;

            _childControl.BringToFront();         
        }

6. Example

Project: FOCA
Source File: FormDocumentsSearch.cs
View license
private void listBoxFound_SelectedValueChanged(object sender, EventArgs e)
        {
            if (lstDocumentsFound.SelectedItem == null) return;
            BringToFront();

            var tnSearched =
                Program.FormMainInstance.TreeViewMetadataSearchDocument(lstDocumentsFound.SelectedItem.ToString());
            if (tnSearched == null) return;

            Program.FormMainInstance.TreeView.SelectedNode = tnSearched;
            Program.FormMainInstance.TreeViewProjectAfterSelect(null,
                new TreeViewEventArgs(Program.FormMainInstance.TreeView.SelectedNode));
            tnSearched.ForeColor = SystemColors.ActiveCaption;
        }

7. Example

Project: gitextensions
Source File: RevisionGrid.cs
View license
private void ShowQuickSearchString()
        {
            if (_quickSearchLabel == null)
            {
                _quickSearchLabel
                    = new Label
                          {
                              Location = new Point(10, 10),
                              BorderStyle = BorderStyle.FixedSingle,
                              ForeColor = SystemColors.InfoText,
                              BackColor = SystemColors.Info
                          };
                Controls.Add(_quickSearchLabel);
            }

            _quickSearchLabel.Visible = true;
            _quickSearchLabel.BringToFront();
            _quickSearchLabel.Text = _quickSearchString;
            _quickSearchLabel.AutoSize = true;
        }

8. Example

Project: ares
Source File: EditExtentForm.cs
View license
private void openOutputRasterButton_Click(object sender, EventArgs e)
        {
            RasterFileDialog openFileDialog = new RasterFileDialog(FileDialogType.Save);

            if (openFileDialog.ShowDialog() == DialogResult.OK)
            {
                outputRasterTextBox.Text = openFileDialog.FileName;
            }

            this.BringToFront();
        }

9. Example

Project: optimizer
Source File: HelperForm.cs
View license
private void Messager_Load(object sender, EventArgs e)
        {
            CheckForIllegalCrossThreadCalls = false;
            this.BringToFront();
        }

10. Example

Project: IceChat
Source File: ServerTree.cs
View license
private void buttonAdd_Click(object sender, EventArgs e)
        {
            if (Application.OpenForms["FormServers"] as FormServers != null)
            {
                Application.OpenForms["FormServers"].BringToFront();
                return;
            }            

            FormServers f = new FormServers();
            f.NewServer += new FormServers.NewServerDelegate(OnNewServer);
            f.SaveDefaultServer += new FormServers.SaveDefaultServerDelegate(OnSaveDefaultServer);            
            f.Show(this.Parent);
        }

11. Example

Project: IceChat
Source File: FormMain.cs
View license
private void iceChatColorsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (Application.OpenForms["FormColors"] as FormColors != null)
            {
                Application.OpenForms["FormColors"].BringToFront();
                return;
            }

            //bring up a very basic settings form
            FormColors fc = new FormColors(iceChatMessages, iceChatColors);
            fc.SaveColors += new FormColors.SaveColorsDelegate(fc_SaveColors);
            fc.StartPosition = FormStartPosition.CenterParent;
            
            fc.Show(this);
        }

12. Example

Project: IceChat
Source File: FormMain.cs
View license
private void fontSettingsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (Application.OpenForms["FormSettings"] as FormSettings != null)
            {
                Application.OpenForms["FormSettings"].BringToFront();
                return;
            }

            FormSettings fs = new FormSettings(iceChatOptions, iceChatFonts, iceChatEmoticons, iceChatSounds, true);
            fs.SaveOptions += new FormSettings.SaveOptionsDelegate(fs_SaveOptions);

            fs.Show(this);
        }

13. Example

Project: IceChat
Source File: FormMain.cs
View license
private void toolStripQuickConnect_Click(object sender, EventArgs e)
        {
            //popup a small dialog asking for basic server settings
            if (Application.OpenForms["QuickConnect"] as QuickConnect != null)
            {
                Application.OpenForms["QuickConnect"].BringToFront();
                return;
            }

            QuickConnect qc = new QuickConnect();            
            qc.QuickConnectServer += new QuickConnect.QuickConnectServerDelegate(OnQuickConnectServer);
            qc.Show(this);
        }

14. Example

Project: IceChat
Source File: FormMain.cs
View license
private void iceChatEditorToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (Application.OpenForms["FormEditor"] as FormEditor != null)
            {
                Application.OpenForms["FormEditor"].BringToFront();
                return;
            }            

            FormEditor fe = new FormEditor();
            fe.Show(this);
        }

15. Example

Project: logwizard
Source File: msg_details_ctrl.cs
View license
private void show(bool do_show, Point p = default(Point) ) {
            // 1.5.10 - when Description control is shown, we never show this
            do_show = do_show && !force_hide_;
            
            if (do_show) {
                force_hide_for_row_ = -1;
                force_hide_for_view_ = null;
                Location = p;
                BringToFront();
            } else {
                txt.Text = "";
                Location = new Point(-100000, -100000);
            }
        }

16. Example

Project: OrgPortal
Source File: Form1.cs
View license
private void DisplayForm()
    {
      this.ShowInTaskbar = true;
      this.WindowState = FormWindowState.Normal;
      this.Visible = true;
      this.BringToFront();
    }

17. Example

View license
protected override void OnControlAdded(ControlEventArgs e)
        {
			if (e.Control != this.InnerControl && !(this is GenericFrameControl<TS>))
				throw new ArgumentException("This control cannot host further controls.");

			base.OnControlAdded(e);
			e.Control.BringToFront();
        }

18. Example

Project: mysql-connector-net
Source File: Form1.cs
View license
private void backToServerBtn_Click(object sender, System.EventArgs e)
		{
			activeTable.Text = String.Empty;
			tableGrid.DataSource = null;
			showServerPanel.BringToFront();
		}

19. Example

Project: mysql-connector-net
Source File: Form1.cs
View license
private void cancel_Click(object sender, System.EventArgs e)
		{
			activeProc.Text = String.Empty;
			spText.Text = String.Empty;
			showServerPanel.BringToFront();
		}

20. Example

View license
private void SetWindowVisible(bool bShow)
        {
            if (bShow)
            {
                this.Visible = true;
                this.WindowState = FormWindowState.Normal;

                this.BringToFront();
            }
            else
            {
                this.Visible = false;
                this.WindowState = FormWindowState.Minimized;
            }
        }

21. Example

Project: OpenLiveWriter
Source File: PanelLoginControl.cs
View license
private void LoginStatus(bool loggingIn)
        {
            lblStatus.AutoSize = true;
            lblStatus.Text = Res.Get(StringId.Plugin_Video_Soapbox_LoggingIn); ;
            lblStatus.Visible = loggingIn;
            lblStatus.Top = Height / 2;
            lblStatus.Left = Width / 2 - lblStatus.Width / 2;
            lblStatus.BringToFront();

            txtUsername.Visible = txtPassword.Visible = pictureBoxLogo.Visible = btnLogin.Visible
                = lblUsername.Visible = lblPassword.Visible = lblEmailExample.Visible = !loggingIn;
            linkLabelPrivacy.Visible = linkLabelCreateMicrosoftAccountID.Visible
                = !loggingIn && ShowCreateMicrosoftAccountID;
            ckBoxSavePassword.Visible = (!loggingIn && _auth.AllowSavePassword);

            Refresh();
        }

22. Example

View license
protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            if (!DesignMode)
            {
                LayoutHelper.NaturalizeHeightAndDistribute(8, Controls);
                linkLabelDownloadPlugins.Top = pictureBoxAddPlugin.Top + 1;
                LayoutHelper.NaturalizeHeight(linkLabelPluginName);
                DisplayHelper.AutoFitSystemRadioButton(radioButtonEnablePlugin, 0, int.MaxValue);
                DisplayHelper.AutoFitSystemRadioButton(radioButtonDisablePlugin, 0, int.MaxValue);
                radioButtonEnablePlugin.BringToFront();
                DisplayHelper.AutoFitSystemButton(buttonOptions);
            }
        }

23. Example

Project: scada
Source File: FrmMain.cs
View license
private void FrmMain_MouseEnter(object sender, EventArgs e)
        {
            // ???????????? ????? ??? ????????? ????
            if (ActiveForm != this)
                BringToFront();
        }

24. Example

Project: Reddit-Wallpaper-Changer
Source File: Update.cs
View license
private void Update_Load(object sender, EventArgs e)
        {
            this.BringToFront();
            this.TopMost = true;
        }

25. Example

Project: Repetier-Host
Source File: Main.cs
View license
public void FormToFront(Form f)
        {
            // Make this form the active form and make it TopMost
            //f.ShowInTaskbar = false;
            /*f.TopMost = true;
            f.Focus();*/
            f.BringToFront();
            // f.TopMost = false;
        }

26. Example

Project: SharpMap
Source File: MagnifierTool.cs
View license
protected override void OnEnabledChanged(EventArgs e)
        {
            if (!Enabled)
            {
                _magnified.Visible = false;
            }
            else
            {
                _magnified.BringToFront();
            }
        }

27. Example

Project: log2console
Source File: MainForm.cs
View license
private void OnFloatyDocking(object sender, EventArgs e)
        {
            // make sure the ZOrder remains intact
            logListView.BringToFront();
            BringToFront();
        }

28. Example

Project: subtitleedit
Source File: VobSubOcr.cs
View license
private void ShowOcrMethodGroupBox(GroupBox groupBox)
        {
            GroupBoxTesseractMethod.Visible = false;
            groupBoxImageCompareMethod.Visible = false;
            groupBoxModiMethod.Visible = false;
            groupBoxNOCR.Visible = false;

            groupBox.Visible = true;
            groupBox.BringToFront();
            groupBox.Left = comboBoxOcrMethod.Left;
            groupBox.Top = 50;
        }

29. Example

Project: btw-gtd
Source File: Region.cs
View license
public void SwitchTo(string key)
        {
            var requestedControl = _controls[key];
            if (requestedControl == _activeControl)
                return;

            _container.Sync(() =>
                {
                    

                    if (_activeControl != null)
                    {
                        _activeControl.Visible = false;
                    }

                    requestedControl.BringToFront();
                    requestedControl.Visible = true;
                    
                    _activeControl = requestedControl;
                    
                });
        }

30. Example

Project: l2net
Source File: Login.cs
View license
private void button_back_ig_Click(object sender, System.EventArgs e)
		{
			panel_select.BringToFront();
		}

31. Example

Project: l2net
Source File: Login.cs
View license
private void button_back_oog_Click(object sender, System.EventArgs e)
		{
			panel_select.BringToFront();
		}

32. Example

Project: xenadmin
Source File: VNCView.cs
View license
private void findConsoleButton_Click(object sender, EventArgs e)
        {
            if (!this.isDocked)
                undockedForm.BringToFront();
            if (undockedForm.WindowState == FormWindowState.Minimized)
                undockedForm.WindowState = FormWindowState.Normal;
        }

33. Example

Project: CurveLock
Source File: Main.cs
View license
private void AddPanel(UserControl pnl)
    {
      content.Controls.Add(pnl);
      ((ICompletePanel)pnl).Complete += PanelComplete;
      pnl.BringToFront();
      _menu.Enabled = false;
    }

34. Example

Project: tcp-gecko-dotnet
Source File: AddressTextBox.cs
View license
public void ShowHistory(bool shown)
        {
            comboBoxHistory.Visible = shown;
            if (comboBoxHistory.Items.Count == 0)
            {
                comboBoxHistory.Items.Add(String.Empty);
            }
            comboBoxHistory.DroppedDown = shown;
            if (shown)
            {
                comboBoxHistory.BringToFront();
                BringToFront();
            }
            else
            {
                comboBoxHistory.SendToBack();
            }
        }

35. Example

Project: tcp-gecko-dotnet
Source File: HistoryTextBox.cs
View license
public void ShowHistory(bool shown)
        {
            comboBoxHistory.Visible = shown;
            if (comboBoxHistory.Items.Count == 0)
            {
                comboBoxHistory.Items.Add(String.Empty);
            }
            comboBoxHistory.DroppedDown = shown;
            if (shown)
            {
                comboBoxHistory.BringToFront();
                BringToFront();
            }
            else
            {
                comboBoxHistory.SendToBack();
            }
        }

36. Example

Project: rhino-tools
Source File: MainView.cs
View license
private void TakeSnapshot_Click(object sender, EventArgs e)
		{
			using (TakeScreenShot snap = new TakeScreenShot())
			{
				Visible = false;
				snap.ShowDialog(this);
				Visible = true;
				BringToFront();
				if (snap.BackgroundImage != null)
				{
					snapShotImg.Image = snap.BackgroundImage;
				}
			}
			drawing.Enabled = true;
			drawing.FlatStyle = FlatStyle.Standard;
			snapShotImg.Cursor = DefaultCursor;
			snapShotComment.Enabled = true;
		}

37. Example

Project: rhino-tools
Source File: ScreenShot.cs
View license
private void TakeSnapshot_Click(object sender, EventArgs e)
		{
			using (TakeScreenShot snap = new TakeScreenShot())
			{
				form.Visible = false;
				snap.ShowDialog(this);
				form.Visible = true;
				BringToFront();
				if (snap.BackgroundImage != null)
				{
					snapShotImg.Image = snap.BackgroundImage;
				}
			}
			drawing.Enabled = true;
			drawing.FlatStyle = FlatStyle.Standard;
			snapShotImg.Cursor = DefaultCursor;
			snapShotComment.Enabled = true;
		}

38. Example

Project: FOCA
Source File: PanelUrlsList.cs
View license
private void viewDownloadedDocumentToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (!Program.data.files.Items.Any(
                F =>
                    string.Equals(F.URL, lstView.SelectedItems[0].Text, StringComparison.OrdinalIgnoreCase) &&
                    F.Processed)) return;
            var fi =
                Program.data.files.Items.First(
                    F =>
                        string.Equals(F.URL, lstView.SelectedItems[0].Text, StringComparison.OrdinalIgnoreCase) &&
                        F.Processed);

            BringToFront();
            var tnSearched = Program.FormMainInstance.TreeViewMetadataSearchDocument(fi.Path);
            if (tnSearched == null) return;

            if (tnSearched == Program.FormMainInstance.TreeView.SelectedNode)
            {
                Program.FormMainInstance.TreeViewProjectAfterSelect(null,
                    new TreeViewEventArgs(Program.FormMainInstance.TreeView.SelectedNode));
                tnSearched.EnsureVisible();
                tnSearched.ForeColor = SystemColors.ActiveCaption;
            }
            else
            {
                Program.FormMainInstance.TreeView.SelectedNode = tnSearched;
                tnSearched.EnsureVisible();
                tnSearched.ForeColor = SystemColors.ActiveCaption;
            }
        }

39. Example

Project: FTPbox
Source File: fMain.cs
View license
private void optionsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Show();
            WindowState = FormWindowState.Normal;
            BringToFront();
        }

40. Example

View license
public void ShowOrBringToFront()
		{
			if (Visible)
				BringToFront();
			else
				Show();
		}

41. Example

View license
protected override void OnControlAdded(ControlEventArgs e)
        {
            base.OnControlAdded(e);


            VerticalScrollbar.BringToFront();
            HorizontalScrollbar.BringToFront();
            
            MainPanel.BringToFront();
        }

42. Example

View license
void MaterialPanel_ControlsChanged(object sender, ControlEventArgs e)
        {
            UpdateScrollbars();
            MainPanel.BringToFront();
            VerticalScrollbar.BringToFront();
            HorizontalScrollbar.BringToFront();
        }

43. Example

View license
protected override void OnLayout(LayoutEventArgs levent)
        {
            base.OnLayout(levent);
            MainPanel.BringToFront();
            VerticalScrollbar.BringToFront();
            HorizontalScrollbar.BringToFront();
        }

44. Example

Project: MaterialWinforms
Source File: MaterialPanel.cs
View license
protected override void OnControlAdded(ControlEventArgs e)
        {
            base.OnControlAdded(e);


            VerticalScrollbar.BringToFront();
            HorizontalScrollbar.BringToFront();
            
            MainPanel.BringToFront();
        }

45. Example

Project: MaterialWinforms
Source File: MaterialPanel.cs
View license
void MaterialPanel_ControlsChanged(object sender, ControlEventArgs e)
        {
            UpdateScrollbars();
            MainPanel.BringToFront();
            VerticalScrollbar.BringToFront();
            HorizontalScrollbar.BringToFront();
        }

46. Example

Project: MaterialWinforms
Source File: MaterialPanel.cs
View license
protected override void OnLayout(LayoutEventArgs levent)
        {
            base.OnLayout(levent);
            MainPanel.BringToFront();
            VerticalScrollbar.BringToFront();
            HorizontalScrollbar.BringToFront();
        }

47. Example

Project: PSVRFramework
Source File: MainForm.cs
View license
private void trayIcon_DoubleClick(object sender, EventArgs e)
        {
            this.Show();
            this.BringToFront();
        }

48. Example

Project: IceChat
Source File: ServerTree.cs
View license
private void buttonEdit_Click(object sender, EventArgs e)
        {
            //open up the Server Editor
            //check if a server is selected or not
            if (Application.OpenForms["FormServers"] as FormServers != null)
            {
                Application.OpenForms["FormServers"].BringToFront();
                return;
            }            
            
            if (selectedServerID > 0)
            {
                f = new FormServers(GetServerSetting(selectedServerID));
                f.SaveServer += new FormServers.SaveServerDelegate(OnSaveServer);
                f.NewServer += new FormServers.NewServerDelegate(OnNewServer);
                f.SaveDefaultServer += new FormServers.SaveDefaultServerDelegate(OnSaveDefaultServer);
            }
            else
            {
                f = new FormServers();
                f.NewServer += new FormServers.NewServerDelegate(OnNewServer);
                f.SaveDefaultServer += new FormServers.SaveDefaultServerDelegate(OnSaveDefaultServer);
            }

            f.Show(this.Parent);
        }

49. Example

Project: IceChat
Source File: FormMain.cs
View license
private void iceChatSettingsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            //bring up a very basic settings form
            if (Application.OpenForms["FormSettings"] as FormSettings != null)
            {
                System.Diagnostics.Debug.WriteLine("Form Settings Open");
                Application.OpenForms["FormSettings"].BringToFront();
                return;
            }

            FormSettings fs = new FormSettings(iceChatOptions, iceChatFonts, iceChatEmoticons, iceChatSounds);
            fs.SaveOptions += new FormSettings.SaveOptionsDelegate(fs_SaveOptions);
            fs.Show(this);
        }

50. Example

Project: SAI-Editor
Source File: MainForm.cs
View license
private void conditionEditorToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (SAI_Editor_Manager.FormState != FormState.FormStateMain)
                return;

            foreach (Form form in Application.OpenForms)
            {
                if (form.Name == "ConditionForm")
                {
                    form.BringToFront();
                    form.Show(); //! Show the form in case it's hidden
                    (form as ConditionForm).formHidden = false;
                    return;
                }
            }

            ConditionForm conditionForm = new ConditionForm();
            conditionForm.formHidden = false;
            conditionForm.Show();
        }