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
()
220 references to Form
Microsoft.VisualBasic.Forms (5)
Microsoft\VisualBasic\ApplicationServices\WindowsFormsApplicationBase.vb (5)
105
Private _splashScreen As
Form
276
Public Property SplashScreen() As
Form
280
Set(value As
Form
)
295
Protected Property MainForm() As
Form
299
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 (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)
282
private bool LocalModalMessageLoop(
Form
? form)
System\Windows\Forms\Application.cs (6)
648
foreach (
Form
f in OpenForms)
1022
HashSet<
Form
> processedForms = new(s_forms.Count);
1027
Form
? form = s_forms[i];
1059
Form
? form = s_forms[^1];
1344
public static void Run(
Form
mainForm)
1359
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)
4442
Form
? lastOwner = null;
4456
if (lastParent is
Form
f)
4458
for (
Form
? form = f; form is not null; form = form.OwnerInternal)
5097
public
Form
? FindForm()
5100
while (current is not null and not
Form
)
5105
return (
Form
?)current;
7462
if (this is
Form
form && form.TopLevel)
8165
bool 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.
10279
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)
1129
&& 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)
175
/// Initializes a new instance of the <see cref="
Form
"/> class.
235
Form
? parentForm = ParentForm;
286
public static
Form
? ActiveForm => FromHandle(PInvokeCore.GetForegroundWindow()) as
Form
;
296
public
Form
? ActiveMdiChild
300
Form
? mdiChild = ActiveMdiChildInternal;
315
mdiChild = FromHandle(hwnd) as
Form
;
331
internal
Form
? ActiveMdiChildInternal
333
get => Properties.GetValueOrDefault<
Form
>(s_propActiveMdiChild);
339
private
Form
? FormerlyActiveMdiChild
341
get => Properties.GetValueOrDefault<
Form
>(s_propFormerlyActiveMdiChild);
800
Form
? formMdiParent = Properties.GetValueOrDefault<
Form
>(s_propFormMdiParent);
801
Form
? form = formMdiParent?.ActiveMdiChildInternal;
868
s_defaultIcon ??= new Icon(typeof(
Form
), "wfc");
1407
public
Form
[] MdiChildren => _ctlClient is not null ? _ctlClient.MdiChildren : ([]);
1441
public
Form
? MdiParent
1447
private
Form
? MdiParentInternal
1449
get => Properties.GetValueOrDefault<
Form
>(s_propFormMdiParent);
1452
Form
? 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.
1613
public
Form
[] OwnedForms => Properties.TryGetValue(s_propOwnedForms, out List<
Form
>? ownedForms) ? ([.. ownedForms]) : ([]);
1622
public
Form
? Owner
1627
Form
? ownerOld = OwnerInternal;
1653
internal
Form
? OwnerInternal => Properties.GetValueOrDefault<
Form
?>(s_propOwner);
2838
protected void ActivateMdiChild(
Form
? form)
2846
Form
? activeMdiChild = ActiveMdiChildInternal;
2878
public void AddOwnedForm(
Form
? ownedForm)
2891
if (!Properties.TryGetValue(s_propOwnedForms, out List<
Form
>? ownedForms))
3158
if (Properties.TryGetValue(s_propFormMdiParent, out
Form
? formMdiParent) && formMdiParent.MdiClient != value)
3345
Form
? form = Properties.GetValueOrDefault<
Form
>(s_propFormMdiParent);
3438
Form
? activeMdiChild = ActiveMdiChildInternal;
3441
Form
? mdiParent = activeMdiChild.MdiParentInternal;
3458
foreach (
Form
mdiChild in mdiParent.MdiChildren)
3537
if (Properties.TryGetValue(s_propOwner, out
Form
? owner))
3545
if (Properties.TryGetValue(s_propOwnedForms, out List<
Form
>? ownedForms))
4847
if (Properties.TryGetValue(s_propOwnedForms, out List<
Form
>? ownedForms))
4875
if (Properties.TryGetValue(s_propOwnedForms, out List<
Form
>? ownedForms))
4994
public void RemoveOwnedForm(
Form
? ownedForm)
5008
if (Properties.TryGetValue(s_propOwnedForms, out List<
Form
>? ownedForms))
5139
Form
? form = ParentForm;
5480
Form
? oldOwner = OwnerInternal;
5481
if (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
5609
new WeakReference<
Form
>(this),
5719
Form
? oldOwner = OwnerInternal;
5755
if (owner is
Form
form && owner != oldOwner)
5909
state: new WeakReference<
Form
>(this),
6088
if (containerControl is
Form
)
6116
if (Properties.TryGetValue(s_propOwner, out
Form
? owner))
6217
Form
? activeMdiChild = ActiveMdiChildInternal;
6303
Form
? activeMdiForm = ActiveMdiChildInternal;
6711
foreach (
Form
mdiChild in MdiChildren)
6736
if (Properties.TryGetValue(s_propOwnedForms, out List<
Form
>? ownedForms))
6791
foreach (
Form
mdiChild in MdiChildren)
6805
if (Properties.TryGetValue(s_propOwnedForms, out List<
Form
>? ownedForms))
6942
if (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)
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\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)
906
if (_topLevelControl is not
Form
topForm || (topForm is not null && !topForm.Modal))
940
if (TopLevelControl is
Form
baseFrom)
1762
Form
? baseFrom = tool.FindForm();
1862
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
;