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
0
1. Example
View licensepublic 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(); }
0
2. Example
View licensepublic void Show(IWin32Window owner, SqlOption filter) { SqlFilter = filter; sqlOptionsFront1.Load(filter); this.Show(owner); }
0
3. Example
View licenseprivate void ShowChildForm(Form form){ form.VisibleChanged += (sender, args) => form.MoveToCenter(this); form.Show(this); }
0
4. Example
View licensepublic 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); }
0
0
6. Example
View licensevoid ShowToolTip() { try { Show(_owner); } catch (Exception e) { Debug.Write("ToolTipForm.Show error " + e); } }
0
7. Example
View licensepublic void Start(IWin32Window parent, IAsyncResult context, bool blocking) { _context = context; if(blocking) { ShowDialog(parent); } else { Show(parent); } }
0
8. Example
View licensepublic 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 ); } }
0
9. Example
View licenseprivate 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); } } }
0
10. Example
View licensepublic new void Show(IWin32Window window = null) { controlTextBox.Focus(); controlTextBox.SelectAll(); if (window == null) { base.Show(); } else { base.Show(window); } }
0
11. Example
View licenseprivate 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); } }
0
12. Example
View licensepublic 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 { } }
0
13. Example
View licensepublic static void Execute() { if (form == null) form = new BedHeightMap(); if(!form.Visible) form.Show(null); form.BringToFront(); }
0
14. Example
View licensepublic 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); } }
0
15. Example
View licensepublic new void Show(IWin32Window owner) { if (Visible) Activate(); else base.Show(owner); }
0
16. Example
View licensepublic 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(); }
0
17. Example
View licensepublic new void Show(IWin32Window owner) { if (!Visible) base.Show(owner); else Activate(); }
0
18. Example
View licenseprotected 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; } }
0
19. Example
View licensepublic 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(); }
0
20. Example
View licenseprotected 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; } }
0
21. Example
View licensepublic 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(); }
0
22. Example
View licensepublic new void Show(Control parent, Control highlight) { base.Show(parent); ParentCtrl = parent; Highlight = highlight; Window = GetRootParent(ParentCtrl); MoveForm(); }
0
23. Example
View licenseprivate 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); }
0
24. Example
View licensepublic void Show(IWin32Window parent) { if (_currentFormInstance == null) { var instance = _factory(); instance.Closed += (x, y) => { _currentFormInstance.Dispose(); _currentFormInstance = null; }; _currentFormInstance = instance; _currentFormInstance.Show(parent); } }
0
25. Example
View licensepublic 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; }
0
26. Example
View licenseprotected 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(); }
0
27. Example
View licensepublic void ShowPerXenModelObjectWizard(IXenObject obj, Form wizard) { CloseActiveWizards(obj); activeXenModelObjectWizards.Add(obj, wizard); wizard.Show(this); }
0
28. Example
View licensepublic 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); }
0
29. Example
View licensepublic 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; }
0
30. Example
View licensepublic 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); } }); }
0
31. Example
View licensepublic 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; } }
0
32. Example
View licensestatic public void PopupDialog() { if (singleton && Instance != null) /n ..... /n //View Source file for more details /n }
0
33. Example
View licensepublic 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(); } }
0
34. Example
View licensepublic 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); } }
0
35. Example
View licenseprivate void Init(CurveCanvas curveCanvas) { var lockorgValues = (int[])Enum.Get/n ..... /n //View Source file for more details /n }
0
36. Example
View licenseinternal void CreateToolbar() { menuForm = new Form() { /n ..... /n //View Source file for more details /n }