19 types derived from Form
Microsoft.VisualBasic.Forms (2)
Microsoft\VisualBasic\Helpers\VBInputBox.vb (1)
13
Inherits
Form
Microsoft\VisualBasic\MyServices\Internal\ProgressDialog.vb (1)
17
Inherits
Form
PresentationUI (1)
MS\Internal\Documents\DialogBaseForm.cs (1)
16
internal class DialogBaseForm :
Form
System.Windows.Forms (7)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridErrorDialog.cs (1)
13
internal partial class GridErrorDialog :
Form
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.DropDownHolder.cs (1)
13
internal sealed partial class DropDownHolder :
Form
, IMouseHookClient
System\Windows\Forms\Design\ComponentEditorForm.cs (1)
14
public partial class ComponentEditorForm :
Form
System\Windows\Forms\Dialogs\ThreadExceptionDialog.cs (1)
15
public class ThreadExceptionDialog :
Form
System\Windows\Forms\MDI\MDIWindowDialog.cs (1)
6
internal sealed partial class MdiWindowDialog :
Form
System\Windows\Forms\Printing\PrintControllerWithStatusDialog.StatusDialog.cs (1)
10
private partial class StatusDialog :
Form
System\Windows\Forms\Printing\PrintPreviewDialog.cs (1)
19
public partial class PrintPreviewDialog :
Form
System.Windows.Forms.Design (9)
System\ComponentModel\Design\BinaryEditor.BinaryUI.cs (1)
11
private class BinaryUI :
Form
System\ComponentModel\Design\CollectionEditor.CollectionForm.cs (1)
15
protected abstract class CollectionForm :
Form
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.FlyoutDialog.cs (1)
13
internal class FlyoutDialog :
Form
System\Windows\Forms\Design\DataGridViewAddColumnDialog.cs (1)
12
internal class DataGridViewAddColumnDialog :
Form
System\Windows\Forms\Design\DataGridViewCellStyleBuilder.cs (1)
9
internal class DataGridViewCellStyleBuilder :
Form
System\Windows\Forms\Design\DataGridViewColumnCollectionDialog.cs (1)
10
internal class DataGridViewColumnCollectionDialog :
Form
System\Windows\Forms\Design\FormatStringDialog.cs (1)
9
internal class FormatStringDialog :
Form
System\Windows\Forms\Design\LinkAreaEditor.LinkAreaUI.cs (1)
14
internal class LinkAreaUI :
Form
System\Windows\Forms\Design\MaskDesignerDialog.cs (1)
14
internal class MaskDesignerDialog :
Form
3 instantiations of Form
Microsoft.VisualBasic.Forms (3)
Microsoft\VisualBasic\Helpers\VBInputBox.vb (2)
26
MyBase.
New
()
31
MyBase.
New
()
Microsoft\VisualBasic\MyServices\Internal\ProgressDialog.vb (1)
49
MyBase.
New
()
227 references to Form
Microsoft.VisualBasic.Forms (5)
Microsoft\VisualBasic\ApplicationServices\WindowsFormsApplicationBase.vb (5)
109
Private _splashScreen As
Form
313
Public Property SplashScreen() As
Form
317
Set(value As
Form
)
332
Protected Property MainForm() As
Form
336
Set(value As
Form
)
PresentationUI (2)
MS\Internal\Documents\DocumentSignatureManager.cs (1)
557
internal bool SignDocument(DigitalSignature digSig,
Form
parentDialog, bool isSaveAs)
MS\Internal\Documents\RightsManagementManager.cs (1)
1631
public
Form
ProgressForm;
System.Windows.Forms (186)
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)
282
private bool LocalModalMessageLoop(
Form
? form)
System\Windows\Forms\Application.cs (9)
260
/// top-level forms that do not set <see cref="
Form
.FormRevealMode"/> explicitly.
265
/// returns <see cref="FormRevealMode.Inherit"/>. Unlike <see cref="
Form
.FormRevealMode"/>, this
431
/// not set <see cref="
Form
.FormRevealMode"/> explicitly.
802
foreach (
Form
f in OpenForms)
1176
HashSet<
Form
> processedForms = new(s_forms.Count);
1181
Form
? form = s_forms[i];
1213
Form
? form = s_forms[^1];
1498
public static void Run(
Form
mainForm)
1513
internal static void RunDialog(
Form
form)
System\Windows\Forms\Application.ModalApplicationContext.cs (1)
16
public ModalApplicationContext(
Form
modalForm) : base(modalForm)
System\Windows\Forms\Application.ThreadContext.cs (2)
65
protected
Form
? CurrentForm { get; private set; }
722
Form
? oldForm = CurrentForm;
System\Windows\Forms\ApplicationContext.cs (6)
17
private
Form
? _mainForm;
31
public ApplicationContext(
Form
? mainForm)
52
public
Form
? MainForm
132
Debug.Assert(sender is
Form
);
133
Form
form = (
Form
)sender;
System\Windows\Forms\Control.cs (12)
4657
Form
? lastOwner = null;
4671
if (lastParent is
Form
f)
4673
for (
Form
? form = f; form is not null; form = form.OwnerInternal)
5320
public
Form
? FindForm()
5323
while (current is not null and not
Form
)
5328
return (
Form
?)current;
8070
if (this is
Form
form && form.TopLevel)
8894
bool formRTL = ((this is
Form
|| this is MdiClient) && IsMirrored);
9617
/// parent. The <see cref="
Form
"/> class overrides this method to perform actual processing of dialog characters.
9631
/// The <see cref="
Form
"/> class overrides this method to perform actual processing of dialog keys.
9745
/// parent. The <see cref="
Form
"/> class overrides this method to perform actual processing of dialog keys.
11008
if (this is
Form
f)
System\Windows\Forms\Control.Ime.cs (4)
518
if (FindForm() is
Form
form)
534
if (FindForm() is
Form
form)
637
Form
? 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)
314
while (parent is not null and not
Form
)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (1)
4878
public DialogResult ShowDialog(
Form
dialog)
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.cs (9)
164
internal static ToolStrip? FindToolStrip(
Form
owningForm, string toolStripName)
604
public static void LoadSettings(
Form
targetForm)
614
public static void LoadSettings(
Form
targetForm, string key)
627
public static void SaveSettings(
Form
sourceForm)
637
public static void SaveSettings(
Form
sourceForm, string key)
838
if (Control.FromHandle(rootWindowOfControl) is
Form
mainForm && mainForm.IsMdiContainer)
840
Form
? toolStripForm = topMostToolStrip.FindForm();
910
if (toplevelControl is
Form
mdiChild && mdiChild.IsMdiChild)
960
Form
? mainForm = control.FindForm();
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.cs (3)
108
internal ToolStripMenuItem(
Form
mdiForm)
480
internal
Form
? MdiForm => Properties.GetValueOrDefault<
Form
>(s_propMdiForm);
System\Windows\Forms\Controls\ToolStrips\ToolStripRenderer.cs (1)
1152
&& statusStrip.FindForm() is
Form
f)
System\Windows\Forms\Controls\ToolStrips\ToolStripSettingsManager.cs (3)
15
private readonly
Form
_form;
18
internal ToolStripSettingsManager(
Form
owner, string formKey)
257
if (controlsToLookIn[i] is null or
Form
)
System\Windows\Forms\Controls\Unsupported\MainMenu\MainMenu.cs (1)
45
public
Form
GetForm() => throw null;
System\Windows\Forms\DataBinding\Binding.cs (1)
223
if (value is
Form
form)
System\Windows\Forms\Design\IUIService.cs (1)
44
DialogResult 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
60
DialogResult ShowDialog(
Form
dialog);
System\Windows\Forms\Dialogs\ThreadExceptionDialog.cs (1)
236
Form
? activeForm = ActiveForm;
System\Windows\Forms\ErrorProvider\ErrorProvider.cs (1)
671
return extendee is Control and not
Form
;
System\Windows\Forms\Form.AccessibleObject.cs (2)
17
internal FormAccessibleObject(
Form
owner) : base(owner)
39
UIA_PROPERTY_ID.UIA_IsDialogPropertyId => (VARIANT)(this.TryGetOwnerAs(out
Form
? owner) && owner.Modal),
System\Windows\Forms\Form.ControlCollection.cs (3)
13
private readonly
Form
_owner;
20
public ControlCollection(
Form
owner)
48
if (value is
Form
form && form.MdiParentInternal is not null)
System\Windows\Forms\Form.cs (61)
178
/// Initializes a new instance of the <see cref="
Form
"/> class.
238
Form
? parentForm = ParentForm;
289
public static
Form
? ActiveForm => FromHandle(PInvokeCore.GetForegroundWindow()) as
Form
;
299
public
Form
? ActiveMdiChild
303
Form
? mdiChild = ActiveMdiChildInternal;
318
mdiChild = FromHandle(hwnd) as
Form
;
334
internal
Form
? ActiveMdiChildInternal
336
get => Properties.GetValueOrDefault<
Form
>(s_propActiveMdiChild);
342
private
Form
? FormerlyActiveMdiChild
344
get => Properties.GetValueOrDefault<
Form
>(s_propFormerlyActiveMdiChild);
803
Form
? formMdiParent = Properties.GetValueOrDefault<
Form
>(s_propFormMdiParent);
804
Form
? form = formMdiParent?.ActiveMdiChildInternal;
871
s_defaultIcon ??= new Icon(typeof(
Form
), "wfc");
1410
public
Form
[] MdiChildren => _ctlClient is not null ? _ctlClient.MdiChildren : ([]);
1444
public
Form
? MdiParent
1450
private
Form
? MdiParentInternal
1452
get => Properties.GetValueOrDefault<
Form
>(s_propFormMdiParent);
1455
Form
? formMdiParent = Properties.GetValueOrDefault<
Form
>(s_propFormMdiParent);
1610
/// Gets an array of <see cref="
Form
"/> objects that represent all forms that are owned by this form.
1616
public
Form
[] OwnedForms => Properties.TryGetValue(s_propOwnedForms, out List<
Form
>? ownedForms) ? ([.. ownedForms]) : ([]);
1625
public
Form
? Owner
1630
Form
? ownerOld = OwnerInternal;
1656
internal
Form
? OwnerInternal => Properties.GetValueOrDefault<
Form
?>(s_propOwner);
2841
protected void ActivateMdiChild(
Form
? form)
2849
Form
? activeMdiChild = ActiveMdiChildInternal;
2881
public void AddOwnedForm(
Form
? ownedForm)
2894
if (!Properties.TryGetValue(s_propOwnedForms, out List<
Form
>? ownedForms))
3161
if (Properties.TryGetValue(s_propFormMdiParent, out
Form
? formMdiParent) && formMdiParent.MdiClient != value)
3348
Form
? form = Properties.GetValueOrDefault<
Form
>(s_propFormMdiParent);
3441
Form
? activeMdiChild = ActiveMdiChildInternal;
3444
Form
? mdiParent = activeMdiChild.MdiParentInternal;
3461
foreach (
Form
mdiChild in mdiParent.MdiChildren)
3540
if (Properties.TryGetValue(s_propOwner, out
Form
? owner))
3548
if (Properties.TryGetValue(s_propOwnedForms, out List<
Form
>? ownedForms))
4863
if (Properties.TryGetValue(s_propOwnedForms, out List<
Form
>? ownedForms))
4891
if (Properties.TryGetValue(s_propOwnedForms, out List<
Form
>? ownedForms))
5010
public void RemoveOwnedForm(
Form
? ownedForm)
5024
if (Properties.TryGetValue(s_propOwnedForms, out List<
Form
>? ownedForms))
5155
Form
? form = ParentForm;
5496
Form
? oldOwner = OwnerInternal;
5497
if (owner is
Form
ownerForm && owner != oldOwner)
5558
/// The returned <see cref="Task"/> carries a <see cref="WeakReference{T}"/> to the <see cref="
Form
"/> in its
5625
new WeakReference<
Form
>(this),
5735
Form
? oldOwner = OwnerInternal;
5771
if (owner is
Form
form && owner != oldOwner)
5925
state: new WeakReference<
Form
>(this),
6104
if (containerControl is
Form
)
6132
if (Properties.TryGetValue(s_propOwner, out
Form
? owner))
6233
Form
? activeMdiChild = ActiveMdiChildInternal;
6319
Form
? activeMdiForm = ActiveMdiChildInternal;
6727
foreach (
Form
mdiChild in MdiChildren)
6752
if (Properties.TryGetValue(s_propOwnedForms, out List<
Form
>? ownedForms))
6807
foreach (
Form
mdiChild in MdiChildren)
6821
if (Properties.TryGetValue(s_propOwnedForms, out List<
Form
>? ownedForms))
6958
if (Properties.TryGetValue(s_propFormMdiParent, out
Form
? formMdiParent))
System\Windows\Forms\Form.RevealMode.cs (1)
34
/// <see cref="
Form
"/> itself, and the process-wide <see cref="Application"/> default, participate.
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)
25
public virtual
Form
? this[string? name]
33
foreach (
Form
form in InnerList)
50
public virtual
Form
? this[int index]
54
Form
? f = null;
58
f = (
Form
?)InnerList[index];
68
internal void Add(
Form
form)
80
internal bool Contains(
Form
form)
94
internal 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\FormRevealMode.cs (3)
8
/// Specifies how WinForms presents a top-level <see cref="
Form
"/> while its initial appearance is
15
/// This is the ambient default and is never returned by <see cref="
Form
.FormRevealMode"/> after
20
/// This value is the ambient sentinel: assigning it to <see cref="
Form
.FormRevealMode"/> clears any
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)
20
foreach (
Form
openForm in Application.OpenForms)
System\Windows\Forms\Layout\Containers\ContainerControl.cs (4)
363
public
Form
? ParentForm
372
if (this is
Form
)
494
Form
? f = FindForm();
555
Form
? form = FindForm();
System\Windows\Forms\MDI\MDIClient.ControlCollection.cs (2)
44
if (value is not
Form
form || !form.IsMdiChild)
63
if (value is
Form
form)
System\Windows\Forms\MDI\MDIClient.cs (7)
16
/// the <see cref="
Form
.IsMdiContainer"/> property to <see langword="true"/>.
24
private readonly List<
Form
> _children = [];
121
public
Form
[] MdiChildren
219
|| ParentInternal is
Form
{ MdiChildrenMinimizedAnchorBottom: false }
243
if (Controls[i] is
Form
child && child.CanRecreateHandle() && child.WindowState == FormWindowState.Minimized)
338
Form
? childForm = null;
339
if (ParentInternal is
Form
parentInternalAsForm)
System\Windows\Forms\MDI\MDIControlStrip.cs (2)
81
Icon icon = !hIcon.IsNull ? Icon.FromHandle(hIcon) :
Form
.DefaultIcon;
86
private bool GetTargetWindowIconVisibility() => _target is not
Form
formTarget || formTarget.ShowIcon;
System\Windows\Forms\MDI\MDIWindowDialog.cs (4)
12
private
Form
? _active;
29
public
Form
? ActiveChildForm
41
public void SetItems(
Form
? active,
Form
[] all)
System\Windows\Forms\MDI\MDIWindowDialog.ListItem.cs (2)
10
public
Form
Form { get; }
12
public ListItem(
Form
f)
System\Windows\Forms\MDI\MdiWindowListStrip.cs (6)
11
private
Form
? _mdiParent;
67
public void PopulateItems(
Form
mdiParent, ToolStripMenuItem mdiMergeItem, bool includeSeparator)
78
Form
[] forms = mdiParent.MdiChildren;
91
Form
? activeMdiChild = mdiParent.ActiveMdiChild;
161
Form
[]? forms = _mdiParent?.MdiChildren;
185
Form
? 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)
910
if (_topLevelControl is not
Form
topForm || (topForm is not null && !topForm.Modal))
944
if (TopLevelControl is
Form
baseFrom)
1766
Form
? baseFrom = tool.FindForm();
1866
Form
? baseFrom = tool.FindForm();
System.Windows.Forms.Design (32)
System\ComponentModel\Design\DesignerActionPanel.cs (4)
433
Debug.Assert(TopLevelControl is
Form
, "DesignerActionPanel must be hosted on a Form.");
434
Form
form = (
Form
)TopLevelControl;
447
if (TopLevelControl is
Form
form)
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.cs (1)
414
DialogResult IWindowsFormsEditorService.ShowDialog(
Form
dialog)
System\Windows\Forms\Design\CollectionEditVerbManager.cs (1)
169
DialogResult IWindowsFormsEditorService.ShowDialog(
Form
dialog)
System\Windows\Forms\Design\DataGridViewDesigner.cs (1)
786
private DialogResult ShowDialog(
Form
dialog)
System\Windows\Forms\Design\DesignerFrame.cs (1)
98
if (_designer is
Form
form)
System\Windows\Forms\Design\DocumentDesigner.cs (3)
511
else 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)
123
DialogResult IWindowsFormsEditorService.ShowDialog(
Form
dialog)
System\Windows\Forms\Design\FormDocumentDesigner.cs (15)
35
((
Form
)Component).AcceptButton = value;
49
((
Form
)Component).CancelButton = value;
65
SizeF real =
Form
.GetAutoScaleSize(((
Form
)Component).Font);
89
return !_initializing && ((
Form
)Component).AutoScale && ShadowProperties.Contains(nameof(AutoScaleBaseSize));
107
if (Component is
Form
form)
131
((
Form
)Component).ClientSize = value;
140
get => ((
Form
)Control).IsMdiContainer;
148
((
Form
)Control).IsMdiContainer = value;
262
private static void ApplyAutoScaling(SizeF baseVar,
Form
form)
268
SizeF newVarF =
Form
.GetAutoScaleSize(form.Font);
333
Debug.Assert(component is
Form
, "FormDocumentDesigner expects its component to be a form.");
343
Form
form = (
Form
)Control;
423
if (Control is
Form
form)
System\Windows\Forms\Design\OleDragDropHandler.CfCodeToolboxItem.cs (1)
107
if (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))
2393
if (c is not
Form
form || !form.TopLevel)
System\Windows\Forms\Design\ToolStripDesigner.cs (2)
1481
Form
parentForm = _host.RootComponent as
Form
;
WindowsFormsIntegration (2)
System\Windows\Integration\WindowsFormsHost.cs (2)
312
SWF.
Form
form = value as SWF.
Form
;