System.Windows.Forms.Form.Show(System.Windows.Forms.IWin32Window)

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

36 Examples 7

1. Example

Project: lua-tilde
Source File: AutocompletePopup.cs
View license
public void Show(string expr, string op, string prefix, Point position)
		{
			waitingPanel.Visible = true;
			mainPanel.Visible = false;
			errorPanel.Visible = false;

			m_expr = expr + op;
			m_operator = op;
			m_prefix = prefix;

			valuesFilterButton.Checked = op != ":";
			functionsFilterButton.Checked = true;
			tablesFilterButton.Checked = op != ":";

			expressionLabel.Text = expr + op + prefix;
			optionsListView.Items.Clear();
			this.DesktopLocation = position;
			this.Show(m_owner);
			Win32.SetFocus(this.Handle);
			optionsListView.Focus();
		}

2. Example

Project: OpenDBDiff
Source File: OptionForm.cs
View license
public void Show(IWin32Window owner, SqlOption filter)
        {
            SqlFilter = filter;
            sqlOptionsFront1.Load(filter);
            this.Show(owner);
        }

3. Example

Project: TweetDuck
Source File: FormBrowser.cs
View license
private void ShowChildForm(Form form){
            form.VisibleChanged += (sender, args) => form.MoveToCenter(this);
            form.Show(this);
        }

4. Example

Project: duality
Source File: ExtMethodsForm.cs
View license
public static void ShowCentered(this Form form, Form parent)
		{
			form.StartPosition = FormStartPosition.Manual;
			form.Location = new Point(
				parent.Location.X + (parent.Width - form.Width) / 2, 
				parent.Location.Y + (parent.Height - form.Height) / 2);
			form.Show(parent);
		}

5. Example

Project: DotSpatial
Source File: MdiDocking.cs
View license
public void ResetLayout()
        {
            _forms.ForEach(_ => _.Show(Shell));
        }

6. Example

Project: IntelliSense
Source File: ToolTipForm.cs
View license
void ShowToolTip()
        {
            try
            {
                Show(_owner);
            }
            catch (Exception e)
            {
                Debug.Write("ToolTipForm.Show error " + e);
            }
        }

7. Example

Project: gitter
Source File: ProgressForm.cs
View license
public void Start(IWin32Window parent, IAsyncResult context, bool blocking)
		{
			_context = context;
			if(blocking)
			{
				ShowDialog(parent);
			}
			else
			{
				Show(parent);
			}
		}

8. Example

Project: RoomEditorApp
Source File: GeoSnoop.cs
View license
public static void DisplayImageInForm(
      IWin32Window owner,
      string caption,
      bool modal,
      Bitmap bmp )
    {
      Form form = new Form();
      form.Text = caption;

      form.Size = new Size( bmp.Width + 7,
        bmp.Height + 13 );

      form.FormBorderStyle = FormBorderStyle
        .FixedToolWindow;

      PictureBox pb = new PictureBox();
      pb.Location = new System.Drawing.Point( 0, 0 );
      pb.Dock = System.Windows.Forms.DockStyle.Fill;
      pb.Size = bmp.Size;
      pb.Parent = form;
      pb.Image = bmp;

      if( modal )
      {
        form.ShowDialog( owner );
      }
      else
      {
        form.Show( owner );
      }
    }

9. Example

View license
private void EquipmentView_CellMouseClick(object sender, DataGridViewCellMouseEventArgs e)
		{

			if (e.RowIndex >= 0)
			{
				int equipmentID = (int)EquipmentView.Rows[e.RowIndex].Cells[0].Value;

				if ((e.Button & System.Windows.Forms.MouseButtons.Right) != 0)
				{
					Cursor = Cursors.AppStarting;
					new DialogAlbumMasterEquipment(equipmentID).Show(Owner);
					Cursor = Cursors.Default;

				}
				else if ((e.Button & System.Windows.Forms.MouseButtons.Left) != 0)
				{
					UpdateAlbumPage(equipmentID);
				}
			}

		}

10. Example

Project: NotepadClone
Source File: FindDialog.cs
View license
public new void Show(IWin32Window window = null) {
            controlTextBox.Focus();
            controlTextBox.SelectAll();

            if (window == null) {
                base.Show();
            } else {
                base.Show(window);
            }
        }

11. Example

View license
private void CreateSwapChain()
        {

            if (this.swapChain == null && this.RenderContext != null)
            {
                NativeWindow nativeWindow = new NativeWindow();
                nativeWindow.AssignHandle(this.node.Window.Handle);
                this.form.Show(nativeWindow);//   IWin32Window ^ w = Control::FromHandle(myWindowHandle);
                this.form.FormBorderStyle = FormBorderStyle.None;
                this.form.Left = 1920;
                this.form.Top = 0;
                this.form.Width = 1920;
                this.form.Height = 1080;
                this.swapChain = new DX11SwapChain(this.RenderContext, this.form.Handle, SlimDX.DXGI.Format.R8G8B8A8_UNorm, new SlimDX.DXGI.SampleDescription(1, 0), 60, 2, false);
                this.RenderContext.Factory.SetWindowAssociation(this.form.Handle, SlimDX.DXGI.WindowAssociationFlags.IgnoreAll);
            }
        }

12. Example

Project: cs-script.npp
Source File: PopupManager.cs
View license
public static void Show(this Form form, IntPtr owner)
        {
            try
            {
                //has very bad side-effect on Win7-x64 (hangs the NPP)
                var nativeWindow = new NativeWindow();
                nativeWindow.AssignHandle(owner);
                form.Show(nativeWindow);
            }
            catch
            {
            }
        }

13. Example

Project: Repetier-Host
Source File: BedHeightMap.cs
View license
public static void Execute()
        {
            if (form == null)
                form = new BedHeightMap();
            if(!form.Visible)
                form.Show(null);
            form.BringToFront();
        }

14. Example

Project: SirenOfShame
Source File: NewAchievement.cs
View license
public static void ShowForm(SirenOfShameSettings settings, AchievementLookup achievement, PersonSetting person, IWin32Window owner, bool modal)
        {
            var newAchievement = new NewAchievement(settings, achievement, person);
            if (modal)
            {
                newAchievement.ShowDialog(owner);
            } 
            else
            {
                newAchievement.Show(owner);
            }
        }

15. Example

Project: SLED
Source File: SledFindAndReplaceForm.cs
View license
public new void Show(IWin32Window owner)
        {
            if (Visible)
                Activate();
            else
                base.Show(owner);
        }

16. Example

Project: SLED
Source File: SledModifiedFilesForm.cs
View license
public new void Show(IWin32Window owner)
        {
            // TODO: Enable this code once we figure out
            // TODO: why SLED gets stuck minimized...
            // TODO: StateMachine Editor uses the same code
            // TODO: but doesn't have the stuck-minimized issue.
            //if (owner != null)
            //{
            //    var ownerForm = FromHandle(owner.Handle) as Form;
            //    if ((ownerForm != null) && (ownerForm.WindowState == FormWindowState.Minimized))
            //        WindowState = FormWindowState.Minimized;
            //}

            if (!Visible)
                base.Show(owner);
            else
                Activate();
        }

17. Example

Project: SLED
Source File: SledProjectModifiedForm.cs
View license
public new void Show(IWin32Window owner)
        {
            if (!Visible)
                base.Show(owner);
            else
                Activate();
        }

18. Example

View license
protected void ShowCompletionWindow()
		{
			Enabled = true;
			// only this.Show() works when running inside a non-interactive Windows Service (e.g. unit tests),
			// so only use the Show(owner) overload when there is an owner.
			if (parentWindow != null)
				this.Show(parentWindow);
			else
				this.Show();
			
			control.Focus();
			
			if (parentForm != null) {
				parentForm.LocationChanged += new EventHandler(this.ParentFormLocationChanged);
			}
			
			control.ActiveTextAreaControl.VScrollBar.ValueChanged     += new EventHandler(ParentFormLocationChanged);
			control.ActiveTextAreaControl.HScrollBar.ValueChanged     += new EventHandler(ParentFormLocationChanged);
			control.ActiveTextAreaControl.TextArea.DoProcessDialogKey += new DialogKeyProcessor(ProcessTextAreaKey);
			control.ActiveTextAreaControl.Caret.PositionChanged       += new EventHandler(CaretOffsetChanged);
			control.ActiveTextAreaControl.TextArea.LostFocus          += new EventHandler(this.TextEditorLostFocus);
			control.Resize += new EventHandler(ParentFormLocationChanged);
			
			foreach (Control c in Controls) {
				c.MouseMove += ControlMouseMove;
			}
		}

19. Example

View license
public void ShowDeclarationViewWindow()
		{
			// only this.Show() works when running inside a non-interactive Windows Service (e.g. unit tests),
			// so only use the Show(owner) overload when there is an owner.
			if (parentWindow != null)
				this.Show(parentWindow);
			else
				this.Show();
		}

20. Example

View license
protected void ShowCompletionWindow()
		{
			Enabled = true;
			// only this.Show() works when running inside a non-interactive Windows Service (e.g. unit tests),
			// so only use the Show(owner) overload when there is an owner.
			if (parentWindow != null)
				this.Show(parentWindow);
			else
				this.Show();
			
			control.Focus();
			
			if (parentForm != null) {
				parentForm.LocationChanged += new EventHandler(this.ParentFormLocationChanged);
			}
			
			control.ActiveTextAreaControl.VScrollBar.ValueChanged     += new EventHandler(ParentFormLocationChanged);
			control.ActiveTextAreaControl.HScrollBar.ValueChanged     += new EventHandler(ParentFormLocationChanged);
			control.ActiveTextAreaControl.TextArea.DoProcessDialogKey += new DialogKeyProcessor(ProcessTextAreaKey);
			control.ActiveTextAreaControl.Caret.PositionChanged       += new EventHandler(CaretOffsetChanged);
			control.ActiveTextAreaControl.TextArea.LostFocus          += new EventHandler(this.TextEditorLostFocus);
			control.Resize += new EventHandler(ParentFormLocationChanged);
			
			foreach (Control c in Controls) {
				c.MouseMove += ControlMouseMove;
			}
		}

21. Example

View license
public void ShowDeclarationViewWindow()
		{
			// only this.Show() works when running inside a non-interactive Windows Service (e.g. unit tests),
			// so only use the Show(owner) overload when there is an owner.
			if (parentWindow != null)
				this.Show(parentWindow);
			else
				this.Show();
		}

22. Example

Project: InnovatorAdmin
Source File: LightBox.cs
View license
public new void Show(Control parent, Control highlight)
    {
      base.Show(parent);
      ParentCtrl = parent;
      Highlight = highlight;
      Window = GetRootParent(ParentCtrl);
      MoveForm();
    }

23. Example

Project: TDMaker
Source File: FormMain.cs
View license
private void ShowNotification(
            string text)
        {
            HideNotification();

            Label label = new Label();
            label.AutoSize = true;
            label.Font = new Font(Font.SystemFontName, 12);
            label.Text = text;

            FormNotification = new Form();
            FormNotification.ControlBox = false;
            FormNotification.ShowInTaskbar = false;
            FormNotification.ShowIcon = false;
            FormNotification.FormBorderStyle = FormBorderStyle.Fixed3D;
            FormNotification.Controls.Add(label);
            FormNotification.Size = new Size(label.Width + 10, 18);
            FormNotification.Show(this);
            FormNotification.Location = new Point(
                this.Location.X + this.Width / 2 - FormNotification.Width / 2,
                this.Location.Y + this.Height / 2 - FormNotification.Height / 2);
        }

24. Example

Project: Urbanization
Source File: FormManager.cs
View license
public void Show(IWin32Window parent)
        {
            if (_currentFormInstance == null)
            {
                var instance = _factory();

                instance.Closed += (x, y) =>
                {
                    _currentFormInstance.Dispose();
                    _currentFormInstance = null;
                };

                _currentFormInstance = instance;
                _currentFormInstance.Show(parent);
            }
        }

25. Example

View license
public Task<DialogResult> ShowDialogAsync(IWin32Window owner = null)
        {
            TaskCompletionSource<DialogResult> tcs = new TaskCompletionSource<DialogResult>();
            this.FormClosed += (s, e) =>
            {
                tcs.SetResult(this.DialogResult);
            };
            if (owner == null)
                this.Show();
            else
                this.Show(owner);

            return tcs.Task;
        }

26. Example

Project: GEDKeeper
Source File: DropDownControl.cs
View license
protected void OpenDropDown()
        {
            if (fDropDownItem == null)
                throw new NotImplementedException("The drop down item has not been initialized! Use the InitializeDropDown() method to do so.");

            if (!CanDrop) return;

            fDropContainer = new DropDownContainer(fDropDownItem);
            fDropContainer.Bounds = GetDropDownBounds();
            fDropContainer.DropStateChange += dropContainer_DropStateChange;
            fDropContainer.FormClosed += dropContainer_Closed;
            ParentForm.Move += ParentForm_Move;
            fDropState = DropDownState.Dropping;
            fDropContainer.Show(this);
            fDropState = DropDownState.Dropped;

            Invalidate();
        }

27. Example

Project: xenadmin
Source File: MainWindow.cs
View license
public void ShowPerXenModelObjectWizard(IXenObject obj, Form wizard)
        {
            CloseActiveWizards(obj);
            activeXenModelObjectWizards.Add(obj, wizard);
            wizard.Show(this);
        }

28. Example

Project: xenadmin
Source File: MainWindow.cs
View license
public void ShowForm(Type type, object[] args)
        {
            foreach (Form form in Application.OpenForms)
            {
                if (form.GetType() == type)
                {
                    HelpersGUI.BringFormToFront(form);
                    return;
                }
            }

            Form newForm = (Form)Activator.CreateInstance(type, args);
            newForm.Show(this);
        }

29. Example

Project: KeeThief
Source File: StatusProgressForm.cs
View license
public static StatusProgressForm ConstructEx(string strTitle,
			bool bCanCancel, bool bMarqueeProgress, Form fOwner,
			string strInitialOp)
		{
			StatusProgressForm dlg = new StatusProgressForm();
			dlg.InitEx(strTitle, bCanCancel, bMarqueeProgress, fOwner);

			if(fOwner != null) dlg.Show(fOwner);
			else dlg.Show();

			dlg.StartLogging(strInitialOp, false);

			return dlg;
		}

30. Example

View license
public void Show(IWin32Window parent, SimulationRenderHelper helper)
        {
            helper
                .SimulationSession
                .GetRecentStatistics()
                .WithResultIfHasMatch(statistics =>
                {
                    if (_currentFormInstance == null)
                    {
                        var instance = _factory(helper);

                        helper.Stopping += (x, y) => instance.Close();

                        instance.Closed += (x, y) =>
                        {
                            _currentFormInstance.Dispose();
                            _currentFormInstance = null;
                        };

                        _currentFormInstance = instance;
                        _currentFormInstance.Show(parent);
                    }
                });
        }

31. Example

Project: NetOffice
Source File: DialogUtils.cs
View license
public Result ShowDialog(object modalOwner, object dialogInstance, bool modal, IEnumerable<KeyValuePair<string, object>> arguments, Result defaultResult)
        {
            Form dialog = (Form)dialogInstance;

            IWin32Window owner = NetOffice.Tools.WndUtils.Win32Window.Create(modalOwner);

            bool isCurrentlySuspended = IsCurrentlySuspended();

            if(null == arguments)
                 arguments = new List<KeyValuePair<string, object>>();

            RaiseDialogShow(DialogType.Custom, isCurrentlySuspended, modal, arguments);
            if (isCurrentlySuspended)
            {
                RaiseDialogShown(DialogType.Custom, true, modal, defaultResult, arguments);
                return defaultResult;
            }

            if (modal)
            {
                DialogResult dlgResult = dialog.ShowDialog(owner);
                RaiseDialogShown(DialogType.Custom, false, true, (Result)dlgResult, arguments);
                return (Result)dlgResult;
            }
            else
            {
                _openNonModalDialogs.Add(dialog, new NonModalDialogValue(DialogType.Custom, arguments));
                dialog.FormClosed += new FormClosedEventHandler(NonModalDialog_FormClosed);
                dialog.Show(owner);
                return Result.None;
            }
        }

32. Example

Project: cs-script.npp
Source File: QuickWatchPanel.cs
View license
static public void PopupDialog()
        {
            if (singleton && Instance != null)
          /n ..... /n //View Source file for more details /n }

33. Example

View license
public void SetSuggestions(Form owner, IEnumerable<string> suggestions)
        {
            if (dismissed)
            {
                return;
            }

            lstSuggest.BeginUpdate();
            try
            {
                lstSuggest.Items.Clear();
                foreach (string sugg in suggestions)
                {
                    lstSuggest.Items.Add(sugg);
                }
                if (lstSuggest.Items.Count == 0)
                {
                    Visible = false;
                }
                else
                {
                    AdjustListSize();
                    if (!Visible)
                        Show(owner);

                    lstSuggest.SelectedIndex = 0;

                }
            }
            finally
            {
                lstSuggest.EndUpdate();
            }
        }

34. Example

Project: xenadmin
Source File: MainWindow.cs
View license
public void ShowPerConnectionWizard(IXenConnection connection, Form wizard)
        {
            if (connection != null)
            {

                if (activePoolWizards.ContainsKey(connection))
                {
                    var w = activePoolWizards[connection].Where(x => x.GetType() == wizard.GetType()).FirstOrDefault();
                    if (w != null && !w.IsDisposed)
                    {
                        if (w.WindowState == FormWindowState.Minimized)
                        {
                            w.WindowState = FormWindowState.Normal;
                        }
                        w.Focus();
                        return;
                    }
                    if (w != null && w.IsDisposed)
                        activePoolWizards[connection].Remove(w);

                }

                //closeActivePoolWizards(connection);
                if (activePoolWizards.ContainsKey(connection))
                    activePoolWizards[connection].Add(wizard);
                else
                    activePoolWizards.Add(connection, new List<Form>() { wizard });

            }

            if (!wizard.Disposing && !wizard.IsDisposed && !Program.Exiting)
            {
                wizard.Show(this);
            }
        }

35. Example

Project: ATF
Source File: CurveEditingControl.cs
View license
private void Init(CurveCanvas curveCanvas)
        {
            var lockorgValues = (int[])Enum.Get/n ..... /n //View Source file for more details /n }

36. Example

Project: ShareX
Source File: ShapeManagerMenu.cs
View license
internal void CreateToolbar()
        {
            menuForm = new Form()
            {
            /n ..... /n //View Source file for more details /n }