19 types derived from Form
Microsoft.VisualBasic.Forms (2)
Microsoft\VisualBasic\Helpers\VBInputBox.vb (1)
13Inherits Form
Microsoft\VisualBasic\MyServices\Internal\ProgressDialog.vb (1)
17Inherits Form
PresentationUI (1)
MS\Internal\Documents\DialogBaseForm.cs (1)
16internal class DialogBaseForm : Form
System.Windows.Forms (7)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridErrorDialog.cs (1)
13internal partial class GridErrorDialog : Form
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.DropDownHolder.cs (1)
13internal sealed partial class DropDownHolder : Form, IMouseHookClient
System\Windows\Forms\Design\ComponentEditorForm.cs (1)
14public partial class ComponentEditorForm : Form
System\Windows\Forms\Dialogs\ThreadExceptionDialog.cs (1)
15public class ThreadExceptionDialog : Form
System\Windows\Forms\MDI\MDIWindowDialog.cs (1)
6internal sealed partial class MdiWindowDialog : Form
System\Windows\Forms\Printing\PrintControllerWithStatusDialog.StatusDialog.cs (1)
10private partial class StatusDialog : Form
System\Windows\Forms\Printing\PrintPreviewDialog.cs (1)
19public partial class PrintPreviewDialog : Form
System.Windows.Forms.Design (9)
System\ComponentModel\Design\BinaryEditor.BinaryUI.cs (1)
11private class BinaryUI : Form
System\ComponentModel\Design\CollectionEditor.CollectionForm.cs (1)
15protected abstract class CollectionForm : Form
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.FlyoutDialog.cs (1)
13internal class FlyoutDialog : Form
System\Windows\Forms\Design\DataGridViewAddColumnDialog.cs (1)
12internal class DataGridViewAddColumnDialog : Form
System\Windows\Forms\Design\DataGridViewCellStyleBuilder.cs (1)
9internal class DataGridViewCellStyleBuilder : Form
System\Windows\Forms\Design\DataGridViewColumnCollectionDialog.cs (1)
10internal class DataGridViewColumnCollectionDialog : Form
System\Windows\Forms\Design\FormatStringDialog.cs (1)
9internal class FormatStringDialog : Form
System\Windows\Forms\Design\LinkAreaEditor.LinkAreaUI.cs (1)
14internal class LinkAreaUI : Form
System\Windows\Forms\Design\MaskDesignerDialog.cs (1)
14internal class MaskDesignerDialog : Form
3 instantiations of Form
Microsoft.VisualBasic.Forms (3)
Microsoft\VisualBasic\Helpers\VBInputBox.vb (2)
26MyBase.New() 31MyBase.New()
Microsoft\VisualBasic\MyServices\Internal\ProgressDialog.vb (1)
49MyBase.New()
220 references to Form
Microsoft.VisualBasic.Forms (5)
Microsoft\VisualBasic\ApplicationServices\WindowsFormsApplicationBase.vb (5)
105Private _splashScreen As Form 276Public Property SplashScreen() As Form 280Set(value As Form) 295Protected Property MainForm() As Form 299Set(value As Form)
PresentationUI (2)
MS\Internal\Documents\DocumentSignatureManager.cs (1)
557internal bool SignDocument(DigitalSignature digSig, Form parentDialog, bool isSaveAs)
MS\Internal\Documents\RightsManagementManager.cs (1)
1631public Form ProgressForm;
System.Windows.Forms (179)
System\Windows\Forms\ActiveX\AxHost.cs (2)
1937/// the <see cref="GroupBox"/> is contained on a <see cref="Form"/>, then the <see cref="ContainingControl"/> 1938/// property value of the ActiveX control is the <see cref="Form"/>, and the <see cref="Control.Parent"/>
System\Windows\Forms\Application.ComponentThreadContext.cs (1)
282private bool LocalModalMessageLoop(Form? form)
System\Windows\Forms\Application.cs (6)
648foreach (Form f in OpenForms) 1022HashSet<Form> processedForms = new(s_forms.Count); 1027Form? form = s_forms[i]; 1059Form? form = s_forms[^1]; 1344public static void Run(Form mainForm) 1359internal static void RunDialog(Form form)
System\Windows\Forms\Application.ModalApplicationContext.cs (1)
16public ModalApplicationContext(Form modalForm) : base(modalForm)
System\Windows\Forms\Application.ThreadContext.cs (2)
65protected Form? CurrentForm { get; private set; } 722Form? oldForm = CurrentForm;
System\Windows\Forms\ApplicationContext.cs (6)
17private Form? _mainForm; 31public ApplicationContext(Form? mainForm) 52public Form? MainForm 132Debug.Assert(sender is Form); 133Form form = (Form)sender;
System\Windows\Forms\Control.cs (12)
4442Form? lastOwner = null; 4456if (lastParent is Form f) 4458for (Form? form = f; form is not null; form = form.OwnerInternal) 5097public Form? FindForm() 5100while (current is not null and not Form) 5105return (Form?)current; 7462if (this is Form form && form.TopLevel) 8165bool formRTL = ((this is Form || this is MdiClient) && IsMirrored); 8888/// parent. The <see cref="Form"/> class overrides this method to perform actual processing of dialog characters. 8902/// The <see cref="Form"/> class overrides this method to perform actual processing of dialog keys. 9016/// parent. The <see cref="Form"/> class overrides this method to perform actual processing of dialog keys. 10279if (this is Form f)
System\Windows\Forms\Control.Ime.cs (4)
518if (FindForm() is Form form) 534if (FindForm() is Form form) 637Form? appForm = topMostWinformsParent as Form;
System\Windows\Forms\Controls\DataGridView\DataGridView.AccessibleObject.cs (1)
30_isModal ??= this.TryGetOwnerAs(out DataGridView? owner) && owner.TopMostParent is Form { Modal: true };
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (1)
2920=> TopLevelControlInternal is Form parentForm && parentForm.WindowState == FormWindowState.Minimized;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridErrorDialog.cs (1)
314while (parent is not null and not Form)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (1)
4878public DialogResult ShowDialog(Form dialog)
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.cs (9)
164internal static ToolStrip? FindToolStrip(Form owningForm, string toolStripName) 604public static void LoadSettings(Form targetForm) 614public static void LoadSettings(Form targetForm, string key) 627public static void SaveSettings(Form sourceForm) 637public static void SaveSettings(Form sourceForm, string key) 838if (Control.FromHandle(rootWindowOfControl) is Form mainForm && mainForm.IsMdiContainer) 840Form? toolStripForm = topMostToolStrip.FindForm(); 910if (toplevelControl is Form mdiChild && mdiChild.IsMdiChild) 960Form? mainForm = control.FindForm();
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.cs (3)
108internal ToolStripMenuItem(Form mdiForm) 480internal Form? MdiForm => Properties.GetValueOrDefault<Form>(s_propMdiForm);
System\Windows\Forms\Controls\ToolStrips\ToolStripRenderer.cs (1)
1129&& statusStrip.FindForm() is Form f)
System\Windows\Forms\Controls\ToolStrips\ToolStripSettingsManager.cs (3)
15private readonly Form _form; 18internal ToolStripSettingsManager(Form owner, string formKey) 257if (controlsToLookIn[i] is null or Form)
System\Windows\Forms\Controls\Unsupported\MainMenu\MainMenu.cs (1)
45public Form GetForm() => throw null;
System\Windows\Forms\DataBinding\Binding.cs (1)
223if (value is Form form)
System\Windows\Forms\Design\IUIService.cs (1)
44DialogResult ShowDialog(Form form);
System\Windows\Forms\Design\IWindowsFormsEditorService.cs (2)
56/// Shows the specified <see cref="Form"/> as a dialog and returns its result. You should always use this 60DialogResult ShowDialog(Form dialog);
System\Windows\Forms\Dialogs\ThreadExceptionDialog.cs (1)
236Form? activeForm = ActiveForm;
System\Windows\Forms\ErrorProvider\ErrorProvider.cs (1)
671return extendee is Control and not Form;
System\Windows\Forms\Form.AccessibleObject.cs (2)
17internal FormAccessibleObject(Form owner) : base(owner) 39UIA_PROPERTY_ID.UIA_IsDialogPropertyId => (VARIANT)(this.TryGetOwnerAs(out Form? owner) && owner.Modal),
System\Windows\Forms\Form.ControlCollection.cs (3)
13private readonly Form _owner; 20public ControlCollection(Form owner) 48if (value is Form form && form.MdiParentInternal is not null)
System\Windows\Forms\Form.cs (61)
175/// Initializes a new instance of the <see cref="Form"/> class. 235Form? parentForm = ParentForm; 286public static Form? ActiveForm => FromHandle(PInvokeCore.GetForegroundWindow()) as Form; 296public Form? ActiveMdiChild 300Form? mdiChild = ActiveMdiChildInternal; 315mdiChild = FromHandle(hwnd) as Form; 331internal Form? ActiveMdiChildInternal 333get => Properties.GetValueOrDefault<Form>(s_propActiveMdiChild); 339private Form? FormerlyActiveMdiChild 341get => Properties.GetValueOrDefault<Form>(s_propFormerlyActiveMdiChild); 800Form? formMdiParent = Properties.GetValueOrDefault<Form>(s_propFormMdiParent); 801Form? form = formMdiParent?.ActiveMdiChildInternal; 868s_defaultIcon ??= new Icon(typeof(Form), "wfc"); 1407public Form[] MdiChildren => _ctlClient is not null ? _ctlClient.MdiChildren : ([]); 1441public Form? MdiParent 1447private Form? MdiParentInternal 1449get => Properties.GetValueOrDefault<Form>(s_propFormMdiParent); 1452Form? formMdiParent = Properties.GetValueOrDefault<Form>(s_propFormMdiParent); 1607/// Gets an array of <see cref="Form"/> objects that represent all forms that are owned by this form. 1613public Form[] OwnedForms => Properties.TryGetValue(s_propOwnedForms, out List<Form>? ownedForms) ? ([.. ownedForms]) : ([]); 1622public Form? Owner 1627Form? ownerOld = OwnerInternal; 1653internal Form? OwnerInternal => Properties.GetValueOrDefault<Form?>(s_propOwner); 2838protected void ActivateMdiChild(Form? form) 2846Form? activeMdiChild = ActiveMdiChildInternal; 2878public void AddOwnedForm(Form? ownedForm) 2891if (!Properties.TryGetValue(s_propOwnedForms, out List<Form>? ownedForms)) 3158if (Properties.TryGetValue(s_propFormMdiParent, out Form? formMdiParent) && formMdiParent.MdiClient != value) 3345Form? form = Properties.GetValueOrDefault<Form>(s_propFormMdiParent); 3438Form? activeMdiChild = ActiveMdiChildInternal; 3441Form? mdiParent = activeMdiChild.MdiParentInternal; 3458foreach (Form mdiChild in mdiParent.MdiChildren) 3537if (Properties.TryGetValue(s_propOwner, out Form? owner)) 3545if (Properties.TryGetValue(s_propOwnedForms, out List<Form>? ownedForms)) 4847if (Properties.TryGetValue(s_propOwnedForms, out List<Form>? ownedForms)) 4875if (Properties.TryGetValue(s_propOwnedForms, out List<Form>? ownedForms)) 4994public void RemoveOwnedForm(Form? ownedForm) 5008if (Properties.TryGetValue(s_propOwnedForms, out List<Form>? ownedForms)) 5139Form? form = ParentForm; 5480Form? oldOwner = OwnerInternal; 5481if (owner is Form ownerForm && owner != oldOwner) 5542/// The returned <see cref="Task"/> carries a <see cref="WeakReference{T}"/> to the <see cref="Form"/> in its 5609new WeakReference<Form>(this), 5719Form? oldOwner = OwnerInternal; 5755if (owner is Form form && owner != oldOwner) 5909state: new WeakReference<Form>(this), 6088if (containerControl is Form) 6116if (Properties.TryGetValue(s_propOwner, out Form? owner)) 6217Form? activeMdiChild = ActiveMdiChildInternal; 6303Form? activeMdiForm = ActiveMdiChildInternal; 6711foreach (Form mdiChild in MdiChildren) 6736if (Properties.TryGetValue(s_propOwnedForms, out List<Form>? ownedForms)) 6791foreach (Form mdiChild in MdiChildren) 6805if (Properties.TryGetValue(s_propOwnedForms, out List<Form>? ownedForms)) 6942if (Properties.TryGetValue(s_propFormMdiParent, out Form? formMdiParent))
System\Windows\Forms\FormClosedEventArgs.cs (2)
7/// Provides data for <see cref="Form.OnFormClosing"/> and <see cref="Form.OnClosing"/> events.
System\Windows\Forms\FormClosingEventArgs.cs (2)
9/// Provides data for <see cref="Form.OnFormClosing"/> and <see cref="Form.OnClosing"/> events.
System\Windows\Forms\FormCollection.cs (8)
25public virtual Form? this[string? name] 33foreach (Form form in InnerList) 50public virtual Form? this[int index] 54Form? f = null; 58f = (Form?)InnerList[index]; 68internal void Add(Form form) 80internal bool Contains(Form form) 94internal void Remove(Form form)
System\Windows\Forms\FormCornerPreference.cs (2)
9/// Specifies the corner preference for a <see cref="Form"/> which can be 10/// set using the <see cref="Form.FormCornerPreference"/> property.
System\Windows\Forms\Input\InputLanguageChangedEventArgs.cs (1)
9/// Provides data for the <see cref="Form.InputLanguageChanged"/> event.
System\Windows\Forms\Input\InputLanguageChangedEventHandler.cs (1)
7/// Represents a method that will handle the <see cref="Form.InputLanguageChanged"/> event.
System\Windows\Forms\Input\InputLanguageChangingEventArgs.cs (1)
10/// Provides data for the <see cref="Form.InputLanguageChanging"/> event.
System\Windows\Forms\Input\InputLanguageChangingEventHandler.cs (1)
7/// Represents a method that will handle the <see cref="Form.InputLanguageChanging"/> event.
System\Windows\Forms\Internal\WinFormsMetadataUpdateHandler.cs (1)
20foreach (Form openForm in Application.OpenForms)
System\Windows\Forms\Layout\Containers\ContainerControl.cs (4)
363public Form? ParentForm 372if (this is Form) 494Form? f = FindForm(); 555Form? form = FindForm();
System\Windows\Forms\MDI\MDIClient.ControlCollection.cs (2)
44if (value is not Form form || !form.IsMdiChild) 63if (value is Form form)
System\Windows\Forms\MDI\MDIClient.cs (7)
16/// the <see cref="Form.IsMdiContainer"/> property to <see langword="true"/>. 24private readonly List<Form> _children = []; 121public Form[] MdiChildren 219|| ParentInternal is Form { MdiChildrenMinimizedAnchorBottom: false } 243if (Controls[i] is Form child && child.CanRecreateHandle() && child.WindowState == FormWindowState.Minimized) 338Form? childForm = null; 339if (ParentInternal is Form parentInternalAsForm)
System\Windows\Forms\MDI\MDIControlStrip.cs (2)
81Icon icon = !hIcon.IsNull ? Icon.FromHandle(hIcon) : Form.DefaultIcon; 86private bool GetTargetWindowIconVisibility() => _target is not Form formTarget || formTarget.ShowIcon;
System\Windows\Forms\MDI\MDIWindowDialog.cs (4)
12private Form? _active; 29public Form? ActiveChildForm 41public void SetItems(Form? active, Form[] all)
System\Windows\Forms\MDI\MDIWindowDialog.ListItem.cs (2)
10public Form Form { get; } 12public ListItem(Form f)
System\Windows\Forms\MDI\MdiWindowListStrip.cs (6)
11private Form? _mdiParent; 67public void PopulateItems(Form mdiParent, ToolStripMenuItem mdiMergeItem, bool includeSeparator) 78Form[] forms = mdiParent.MdiChildren; 91Form? activeMdiChild = mdiParent.ActiveMdiChild; 161Form[]? forms = _mdiParent?.MdiChildren; 185Form? boundForm = windowListItem.MdiForm;
System\Windows\Forms\Rendering\DpiChangedEventHandler.cs (1)
7/// Represents a method that will handle the <see cref="Form.DpiChanged"/> event.
System\Windows\Forms\SizeGripStyle.cs (1)
7/// Specifies the style of the sizing grip on a <see cref="Form"/>.
System\Windows\Forms\ToolTip\ToolTip.cs (4)
906if (_topLevelControl is not Form topForm || (topForm is not null && !topForm.Modal)) 940if (TopLevelControl is Form baseFrom) 1762Form? baseFrom = tool.FindForm(); 1862Form? baseFrom = tool.FindForm();
System.Windows.Forms.Design (32)
System\ComponentModel\Design\DesignerActionPanel.cs (4)
433Debug.Assert(TopLevelControl is Form, "DesignerActionPanel must be hosted on a Form."); 434Form form = (Form)TopLevelControl; 447if (TopLevelControl is Form form)
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.cs (1)
414DialogResult IWindowsFormsEditorService.ShowDialog(Form dialog)
System\Windows\Forms\Design\CollectionEditVerbManager.cs (1)
169DialogResult IWindowsFormsEditorService.ShowDialog(Form dialog)
System\Windows\Forms\Design\DataGridViewDesigner.cs (1)
786private DialogResult ShowDialog(Form dialog)
System\Windows\Forms\Design\DesignerFrame.cs (1)
98if (_designer is Form form)
System\Windows\Forms\Design\DocumentDesigner.cs (3)
511else if (autoSize && (mode == AutoSizeMode.GrowAndShrink) && !(Control is Form)) 852|| (cd.Control is Form form && form.TopLevel); 899&& !(ce.Component is Form form && form.TopLevel);
System\Windows\Forms\Design\EditorServiceContext.cs (1)
123DialogResult IWindowsFormsEditorService.ShowDialog(Form dialog)
System\Windows\Forms\Design\FormDocumentDesigner.cs (15)
35((Form)Component).AcceptButton = value; 49((Form)Component).CancelButton = value; 65SizeF real = Form.GetAutoScaleSize(((Form)Component).Font); 89return !_initializing && ((Form)Component).AutoScale && ShadowProperties.Contains(nameof(AutoScaleBaseSize)); 107if (Component is Form form) 131((Form)Component).ClientSize = value; 140get => ((Form)Control).IsMdiContainer; 148((Form)Control).IsMdiContainer = value; 262private static void ApplyAutoScaling(SizeF baseVar, Form form) 268SizeF newVarF = Form.GetAutoScaleSize(form.Font); 333Debug.Assert(component is Form, "FormDocumentDesigner expects its component to be a form."); 343Form form = (Form)Control; 423if (Control is Form form)
System\Windows\Forms\Design\OleDragDropHandler.CfCodeToolboxItem.cs (1)
107if (component is Control { Parent: null } childControl and not Form { TopLevel: true }) // Don't add top-level forms
System\Windows\Forms\Design\ParentControlDesigner.cs (2)
456&& host.GetDesigner(newChild) as ControlDesigner is not null && !(newChild is Form form && form.TopLevel)) 2393if (c is not Form form || !form.TopLevel)
System\Windows\Forms\Design\ToolStripDesigner.cs (2)
1481Form parentForm = _host.RootComponent as Form;
WindowsFormsIntegration (2)
System\Windows\Integration\WindowsFormsHost.cs (2)
312SWF.Form form = value as SWF.Form;