91 types derived from Form
Accessibility_Core_App (13)
CommonControl1.cs (1)
8public partial class CommonControl1 : Form
CommonControl2.cs (1)
8public partial class CommonControl2 : Form
ContainerControls.cs (1)
8public partial class ContainerControls : Form
ContainerControls2.cs (1)
8public partial class ContainerControls2 : Form
DataBindingExample.cs (1)
9public partial class DataBindingExample : Form
DataControls.cs (1)
9public partial class DataControls : Form
DialogControls.cs (1)
8public partial class DialogControls : Form
Main.cs (1)
8public partial class Main : Form
Menu_Toolbars_controls.cs (1)
8public partial class Menu_Toolbars_controls : Form
MenuForm.cs (1)
8public partial class MenuForm : Form
PrintingControls.cs (1)
9public partial class PrintingControls : Form
RemainingControls.cs (1)
8public partial class RemainingControls : Form
ToolStripContainer.cs (1)
8public partial class ToolStripContainer : Form
DesignSurface (1)
MainForm.cs (1)
14public partial class MainForm : Form
Microsoft.VisualBasic.Forms (2)
Microsoft\VisualBasic\Helpers\VBInputBox.vb (1)
12Inherits Form
Microsoft\VisualBasic\MyServices\Internal\ProgressDialog.vb (1)
15Inherits Form
PresentationUI (1)
MS\Internal\Documents\DialogBaseForm.cs (1)
19internal class DialogBaseForm : Form
ScratchProject (1)
Form1.cs (1)
10public partial class Form1 : Form
ScratchProjectWithInternals (1)
Form1.cs (1)
10public partial class Form1 : 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)
12private 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
System.Windows.Forms.Tests (6)
System\Windows\Forms\AccessibleObjects\Form.FormAccessibleObjectTests.cs (1)
206private class FocusEventsCounterForm : Form
System\Windows\Forms\ApplicationContextTests.cs (1)
414private class SubForm : Form
System\Windows\Forms\FormTests.cs (3)
2648public partial class ParentedForm : Form 2668public class ParentingForm : Form 2678public class SubForm : Form
System\Windows\Forms\SendKeysTests.cs (1)
27private class CaptureForm : Form
System.Windows.Forms.TestUtilities (1)
DialogHostForm.cs (1)
15internal class DialogHostForm : Form
System.Windows.Forms.UI.IntegrationTests (2)
DragDropTests.cs (2)
580private class DragDropForm : Form 890private class DragImageDropDescriptionForm : Form
TrimTest (1)
Form1.cs (1)
10public partial class Form1 : Form
TrimTestBinaryDeserialization (1)
Form1.cs (1)
9public partial class Form1 : Form
WinFormsControlsTest (45)
AnchorLayoutTests.cs (1)
7public partial class AnchorLayoutTests : Form
Buttons.cs (1)
9public partial class Buttons : Form
Calendar.cs (1)
9public partial class Calendar : Form
ChartControl.cs (1)
10public partial class ChartControl : Form
CollectionEditors.cs (1)
15internal partial class CollectionEditors : Form
ComboBoxes.cs (1)
9public partial class ComboBoxes : Form
ComboBoxesWithScrollBars.cs (1)
9public partial class ComboBoxesWithScrollBars : Form
CustomComCtl32Button.cs (1)
10internal class CustomComCtl32Button : Form
DataGridViewInVirtualModeTest.cs (1)
7public partial class DataGridViewInVirtualModeTest : Form
DataGridViewTest.cs (1)
9public partial class DataGridViewTest : Form
DateTimePicker.cs (1)
7public partial class DateTimePicker : Form
DesignTimeAligned.cs (1)
7public partial class DesignTimeAligned : Form
Dialogs.cs (1)
13public partial class Dialogs : Form
DockLayoutTests.cs (1)
7public partial class DockLayoutTests : Form
DragDrop.cs (1)
11public partial class DragDrop : Form
ErrorProviderTest.cs (1)
7public partial class ErrorProviderTest : Form
FormBorderStyles.cs (1)
7public partial class FormBorderStyles : Form
FormOwnerTestForm.cs (2)
9internal class FormOwnerTestForm : Form 54public class MemoryTestParentForm : Form
FormShowInTaskbar.cs (1)
9public class FormShowInTaskbar : Form
ListBoxes.cs (1)
9public partial class ListBoxes : Form
ListViewTest.cs (1)
8public partial class ListViewTest : Form
MainForm.cs (1)
14public partial class MainForm : Form
MdiChild.cs (1)
7public partial class MdiChild : Form
MdiParent.cs (1)
9public partial class MdiParent : Form
MediaPlayer.cs (1)
7public partial class MediaPlayer : Form
MenuStripAndCheckedListBox.cs (1)
9public partial class MenuStripAndCheckedListBox : Form
MessageBoxes.cs (1)
9public partial class MessageBoxes : Form
MultipleControls.cs (1)
9public partial class MultipleControls : Form
Panels.cs (1)
7public partial class Panels : Form
Password.cs (1)
7public partial class Password : Form
PictureBoxes.cs (1)
7public partial class PictureBoxes : Form
PropertyGrid.cs (1)
7public partial class PropertyGrid : Form
RichTextBoxes.cs (1)
11public partial class RichTextBoxes : Form
ScalingBeforeChanges.cs (1)
14public partial class ScalingBeforeChanges : Form
ScrollableControls.cs (1)
6public partial class ScrollableControls : Form
ScrollBars.cs (1)
7public partial class ScrollBars : Form
Splitter.cs (1)
7public partial class Splitter : Form
TaskDialogSamples.cs (1)
9public class TaskDialogSamples : Form
TextBoxes.cs (1)
7public partial class TextBoxes : Form
ToolStripSeparatorPreferredSize.cs (1)
7internal class ToolStripSeparatorPreferredSize : Form
ToolStripTests.cs (1)
9public partial class ToolStripTests : Form
ToolTipTests.cs (1)
7public partial class ToolTipTests : Form
TrackBars.cs (1)
7public partial class TrackBars : Form
TreeViewTest.cs (1)
7public partial class TreeViewTest : Form
267 instantiations of Form
Microsoft.VisualBasic.Forms (3)
Microsoft\VisualBasic\Helpers\VBInputBox.vb (2)
25MyBase.New() 30MyBase.New()
Microsoft\VisualBasic\MyServices\Internal\ProgressDialog.vb (1)
47MyBase.New()
System.Windows.Forms.Design.Tests (2)
System\Resources\Tools\StronglyTypedResourceBuilderTests.cs (1)
611using Form form = new();
System\Windows\Forms\Design\InheritanceUITests.cs (1)
24_form = new Form();
System.Windows.Forms.Tests (218)
NumericUpDownTests.cs (3)
28using Form form = new(); 71using Form form = new(); 107using Form form = new();
System\Windows\Forms\AccessibleObjects\AccessibleObjectTests.cs (5)
543using Form form = new(); 571using Form form = new(); 594using Form form = new(); 2617using Form form = new(); 2649using Form form = new();
System\Windows\Forms\AccessibleObjects\Control.ControlAccessibleObjectTests.cs (1)
1674using Form form = new();
System\Windows\Forms\AccessibleObjects\DataGridViewAccessibleObjectTests.cs (1)
548using Form form = new();
System\Windows\Forms\AccessibleObjects\DateTimePicker.DateTimePickerAccessibleObjectTests.cs (1)
350using Form form = new();
System\Windows\Forms\AccessibleObjects\ErrorProviderAccessibleObjectTests.cs (1)
23_form = new Form();
System\Windows\Forms\AccessibleObjects\Form.FormAccessibleObjectTests.cs (9)
16using Form form = new(); 26using Form form = new(); 40using Form form = new(); 58using Form form = new(); 92using Form form = new(); 105using Form form = new(); 172using Form form = new(); 191using Form form = new(); 192using Form embeddedForm = new() { TopLevel = false };
System\Windows\Forms\AccessibleObjects\ListBox.ListBoxItemAccessibleObjectTests.cs (1)
18using Form form = new()
System\Windows\Forms\AccessibleObjects\ListBoxAccessibleObjectTests.cs (2)
135using Form form = new(); 346using Form form = new();
System\Windows\Forms\AccessibleObjects\ListViewGroup.ListViewGroupAccessibleObjectTests.cs (2)
275using Form form = new(); 318using Form form = new();
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewItemDetailsAccessibleObjectTests.cs (2)
184using Form form = new(); 214using Form form = new();
System\Windows\Forms\AccessibleObjects\Panel.PanelAccessibleObjectTests.cs (1)
259using Form form = new();
System\Windows\Forms\AccessibleObjects\TabPage.TabPageAccessibleObjectTests.cs (1)
526using Form form = new();
System\Windows\Forms\Application.ParkingWindowTests.cs (1)
39Form form = new();
System\Windows\Forms\ApplicationContextTests.cs (6)
20yield return new object[] { new Form() }; 54MainForm = new Form() 171using Form mainForm = new(); 185using Form mainForm = new(); 248using Form mainForm = new(); 262using Form mainForm = new();
System\Windows\Forms\ApplicationTests.cs (6)
389using Form mainForm = new Form(); 404AddMDI(new Form()); 444var child = new Form 527using Form mainForm = new Form(); 559Form other = new Form() { Text = "Child" }; 625Form add = new Form() { Text = "Add" };
System\Windows\Forms\AxHost.VisualBasic6Tests.cs (1)
20using Form form = new();
System\Windows\Forms\AxSystemMonitorTests.cs (1)
16_form = new Form();
System\Windows\Forms\AxWebBrowserTests.cs (1)
18_form = new Form();
System\Windows\Forms\BinaryFormat\WinFormsBinaryFormattedObjectTests.cs (1)
168{ new Form(), new string[] { "DataContext: Object", "Tag: Object" } },
System\Windows\Forms\ButtonRenderingTests.cs (1)
214using Form form = new();
System\Windows\Forms\ButtonTests.cs (4)
1934using Form form = new(); 2016using Form form = new(); 3118using Form form = new(); 3196using Form form = new();
System\Windows\Forms\CheckBoxRendererTests.cs (4)
18using Form form = new(); 54using Form form = new(); 91using Form form = new(); 127using Form form = new();
System\Windows\Forms\CheckBoxTests.cs (2)
815using Form form = new(); 845using Form form = new();
System\Windows\Forms\ControlBindingsCollectionTests.cs (1)
90using Form control = new();
System\Windows\Forms\ControlTests.cs (4)
925using Form form = new() { RightToLeft = rightToLeft, }; 982using Form form = new() { RightToLeft = rightToLeft }; 1037using Form form = new(); 1097using Form form = new();
System\Windows\Forms\ControlTests.Internals.cs (1)
415using Form form = new();
System\Windows\Forms\ControlTests.Methods.cs (1)
1967Form form = new();
System\Windows\Forms\ControlTests.Properties.cs (1)
9678yield return new object[] { new Form() };
System\Windows\Forms\DataGridViewCellTests.cs (7)
200using Form form = new(); 843using Form form = new(); 879using Form form = new(); 4047using Form form = new(); 4090using Form form = new(); 4354using Form form = new(); 5146using Form form = new();
System\Windows\Forms\DataGridViewHeaderCellTests.cs (2)
2416using Form form = new(); 3683using Form form = new();
System\Windows\Forms\DataGridViewRowTests.cs (8)
108using Form form = new(); 326using Form form = new(); 353using Form form = new(); 941using Form form = new(); 1871using Form form = new(); 2340using Form form = new(); 4332using Form form = new(); 4457using Form form = new();
System\Windows\Forms\DataGridViewTests.cs (1)
2321using Form form = new Form
System\Windows\Forms\DataGridViewTests.Rendering.cs (2)
16using Form form = new(); 105using Form form = new Form
System\Windows\Forms\ErrorProviderTests.cs (2)
855yield return new object[] { new Form(), false }; 1315using Form form = new();
System\Windows\Forms\Form.ControlCollectionTests.cs (1)
11using Form owner = new();
System\Windows\Forms\FormTests.cs (86)
193using Form form = new(); 210using Form form = new(); 223using Form form = new() 251using Form form = new(); 252using Form child = new(); 263using Form form = new(); 264using Form child = new() 279using Form form = new(); 280using Form child = new() 294using Form form = new(); 295using Form child = new() 310using Form control = new() 344using Form control = new() 374using Form control = new() 404using Form control = new(); 453using Form control = new() 501using Form control = new() 549using Form form = new() 566using Form form = new() 581using Form form = new() 596using Form form = new() 623using Form control = new() 657using Form control = new() 680using Form control = new() 712using Form control = new(); 748using Form control = new() 794using Form control = new(); 839using Form control = new(); 889using Form control = new() 926yield return new object[] { new Form() }; 933using Form control = new() 954using Form control = new() 982using Form form = new(); 1011using Form form = new(); 1037using Form form = new(); 1051using Form form = new(); 1074using Form oldParent = new() 1078using Form control = new() 1100using Form control = new() 1120using Form control = new() 1154using Form control = new() 1192using Form control = new() 1203using Form control = new(); 1212using Form oldParent = new() 1216using Form control = new() 1220using Form parent = new(); 1229using Form parent = new(); 1236using Form control = new(); 1278using Form control = new() 1310using Form control = new() 1344using Form control = new() 1377using Form control = new() 1399using Form control = new() 1421using Form control = new(); 1460using Form control = new(); 1492using Form control = new() 1534using Form control = new() 1569using Form control = new(); 1603using Form control = new(); 1636using Form control = new() 1672using Form control = new() 1707using Form control = new(); 1741using Form control = new(); 1786using Form control = new() 1824using Form form = new() 1862using Form control = new() 1901using Form parent = new() 1906using Form control = new() 1935using Form control = new() 1983using Form parent = new() 1988using Form control = new() 2035using Form parent = new() 2040using Form control = new() 2087using Form parent = new() 2091using Form control = new() 2129using Form control = new() 2184using Form parent = new() 2189using Form control = new() 2237using Form parent = new() 2241using Form control = new() 2290using Form control = new() 2348using Form control = new() 2600using Form parent = new(); 2605using Form child = new(); 2631using Form parent = new() { IsMdiContainer = true }; 2632using Form mdiChild = new() { MdiParent = parent };
System\Windows\Forms\LabelTests.cs (1)
288using Form form = new();
System\Windows\Forms\MdiControlStripTests.cs (11)
17using Form form = new(); 157using Form form = new(); 175using Form form = new(); 202using Form mdiParent = new() 209using Form mdiChild = new() 248using Form mdiParent = new() 255using Form mdiChild = new() 293using Form mdiParent = new() { IsMdiContainer = true }; 294using Form mdiChild = new() 315using Form mdiParent = new() { IsMdiContainer = true, Text = "Parent" }; 316using Form mdiChild = new() { MdiParent = mdiParent, Text = "Child" };
System\Windows\Forms\MixedDpiHostingTests.cs (1)
24using Form form = new();
System\Windows\Forms\NativeWindowTests.cs (1)
29using Form control = new();
System\Windows\Forms\PictureBoxTests.cs (1)
1118yield return new object[] { new Form() };
System\Windows\Forms\RadioButtonRendererTests.cs (4)
17using Form form = new Form(); 48using Form form = new Form(); 85using Form form = new Form(); 106using Form form = new Form();
System\Windows\Forms\ScrollBarTests.cs (2)
3107Form form = new(); 3126Form form = new();
System\Windows\Forms\SplitterPanelTests.cs (1)
714yield return new object[] { new Form() };
System\Windows\Forms\StatusStripTests.Rendering.cs (1)
14using Form form = new();
System\Windows\Forms\TextBoxRendererTests.cs (3)
24using Form form = new(); 53using Form form = new(); 88using Form form = new();
System\Windows\Forms\ToolStripButtonTests.Rendering.cs (6)
14using Form form = new(); 40using Form form = new(); 66using Form form = new(); 92using Form form = new(); 118using Form form = new(); 145using Form form = new();
System\Windows\Forms\ToolStripMenuItemTests.cs (1)
114using Form form = new();
System\Windows\Forms\ToolStripPanelRow.ToolStripPanelRowControlCollectionTests.cs (1)
14using Form form = new();
System\Windows\Forms\ToolStripSettingsManagerTests.cs (1)
11using Form mainForm = new();
System\Windows\Forms\ToolStripTests.cs (2)
1626using Form form = new(); 1646using Form form = new();
System\Windows\Forms\ToolStripTests.Rendering.cs (1)
14using Form form = new();
System\Windows\Forms\ToolTipTests.cs (2)
836using Form form = new(); 877using Form form = new();
System\Windows\Forms\VisualStyles\VisualStyleRendererTests.cs (1)
503using Form form = new();
System\Windows\Forms\WebBrowserTests.cs (1)
4758using Form form = new();
TextBoxTests.Rendering.cs (1)
16using Form form = new();
System.Windows.Forms.UI.IntegrationTests (38)
AnchorLayoutTests.cs (1)
273Form form = new()
ApplicationTests.cs (2)
22using Form child = new() { RightToLeft = RightToLeft.No }; 46return new()
ButtonTests.cs (1)
410return new()
DataGridViewTests.cs (1)
85return new()
Dpi\FormDpiTests.cs (7)
30using Form form = new(); 69using Form form = new(); 103using Form form = new(); 137using Form form = new(); 173using Form form = new(); 205using Form form = new(); 233using Form form = new();
Dpi\SplitContainerTests.cs (1)
45using Form form = new();
Dpi\ToolStripItemTests.Dpi.cs (1)
34using Form form = new();
DragDropTests.cs (2)
64await RunFormWithoutControlAsync(() => new Form(), async (form) => 279await RunFormWithoutControlAsync(() => new Form(), async (form) =>
FormTests.cs (1)
147Form form = new()
ImageListTests.cs (1)
109Form form = new()
Infra\ControlTestBase.cs (3)
230Form form = new() 252form = new(); 278Form form = new()
ListBoxAccesibleObjectTests.cs (3)
14using Form form = new(); 35using Form form = new(); 49using Form form = new();
ListBoxItemAccessibleObjestTests.cs (3)
14using Form form = new(); 37using Form formDoubleClick = new(); 52using Form form = new();
ListViewTests.cs (1)
580return new()
MDITests.cs (3)
21using Form childForm = new() 43using Form childForm = new() 67return new()
MenuStripTests.cs (1)
14using Form form = new();
MonthCalendarTests.cs (2)
217return new() 239return new()
PropertyGridTests.cs (1)
22_form = new() { Controls = { _propertyGrid } };
RichTextBoxTests.cs (1)
250return new()
ToolStripTests.cs (2)
31using Form form = new(); 67using Form form = new();
VisualBasicRuntimeTest (1)
Program.cs (1)
81Form mainForm = new();
WinFormsControlsTest (5)
FormOwnerTestForm.cs (1)
63Form child = new();
FormShowInTaskbar.cs (1)
31using Form form = new()
MdiChild.cs (1)
28Form frm = new()
MdiParent.cs (1)
22Form child = new()
RichTextBoxes.cs (1)
119Form prompt = new()
614 references to Form
DesignSurface (7)
MainForm.cs (7)
118Form rootComponent = null; 123rootComponent = surface.CreateRootComponent<Form>(new Size(400, 400)); 184rootComponent = surface.CreateRootComponent<Form>(new Size(640, 480)); 213rootComponent = surface.CreateRootComponent<Form>(new Size(800, 600)); 235rootComponent = surface.CreateRootComponent<Form>(new Size(800, 600)); 270rootComponent = surface.CreateRootComponent<Form>(new Size(800, 600)); 292rootComponent = surface.CreateRootComponent<Form>(new Size(800, 600));
DesignSurfaceExt (1)
DesignSurfaceExt.cs (1)
122if (hostType == typeof(Form))
Microsoft.CodeAnalysis.CSharp.Scripting.Desktop.UnitTests (2)
InteractiveSessionReferencesTests.cs (2)
213var options3 = options2.AddReferences(typeof(System.Windows.Forms.Form).Assembly.Location); 215var s3 = await s2.ContinueWithAsync<System.Windows.Forms.Form>(@"
Microsoft.VisualBasic.Forms (5)
Microsoft\VisualBasic\ApplicationServices\WindowsFormsApplicationBase.vb (5)
109Private _splashScreen As Form 304Public Property SplashScreen() As Form 308Set(value As Form) 322Protected Property MainForm() As Form 326Set(value As Form)
Microsoft.VisualStudio.LanguageServices.Test.Utilities2 (1)
CodeModel\CodeModelTestHelpers.vb (1)
40SystemWindowsFormsPath = GetType(System.Windows.Forms.Form).Assembly.Location
PresentationUI (2)
MS\Internal\Documents\DocumentSignatureManager.cs (1)
573internal bool SignDocument(DigitalSignature digSig, Form parentDialog, bool isSaveAs)
MS\Internal\Documents\RightsManagementManager.cs (1)
1649public Form ProgressForm;
System.Windows.Forms (174)
System\Windows\Forms\ActiveX\AxHost.cs (2)
1939/// the <see cref="GroupBox"/> is contained on a <see cref="Form"/>, then the <see cref="ContainingControl"/> 1940/// 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)
610foreach (Form f in OpenForms) 985HashSet<Form> processedForms = new(s_forms.Count); 990Form? form = s_forms[i]; 1025Form? form = s_forms[^1]; 1308public static void Run(Form mainForm) 1323internal 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)
66protected Form? CurrentForm { get; private set; } 737Form? oldForm = CurrentForm;
System\Windows\Forms\ApplicationContext.cs (6)
17private Form? _mainForm; 31public ApplicationContext(Form? mainForm) 52public Form? MainForm 140Debug.Assert(sender is Form); 141Form form = (Form)sender;
System\Windows\Forms\Control.cs (12)
4354Form? lastOwner = null; 4368if (lastParent is Form f) 4370for (Form? form = f; form is not null; form = form.OwnerInternal) 4969public Form? FindForm() 4972while (current is not null and not Form) 4977return (Form?)current; 7334if (this is Form form && form.TopLevel) 8047bool formRTL = ((this is Form || this is MdiClient) && IsMirrored); 8770/// parent. The <see cref="Form"/> class overrides this method to perform actual processing of dialog characters. 8784/// The <see cref="Form"/> class overrides this method to perform actual processing of dialog keys. 8898/// parent. The <see cref="Form"/> class overrides this method to perform actual processing of dialog keys. 10152if (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)
31_isModal ??= this.TryGetOwnerAs(out DataGridView? owner) && owner.TopMostParent is Form { Modal: true };
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (1)
2913=> 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)
4846public DialogResult ShowDialog(Form dialog)
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.cs (9)
165internal static ToolStrip? FindToolStrip(Form owningForm, string toolStripName) 620public static void LoadSettings(Form targetForm) 630public static void LoadSettings(Form targetForm, string key) 643public static void SaveSettings(Form sourceForm) 653public static void SaveSettings(Form sourceForm, string key) 854if (Control.FromHandle(rootWindowOfControl) is Form mainForm && mainForm.IsMdiContainer) 856Form? toolStripForm = topMostToolStrip.FindForm(); 926if (toplevelControl is Form mdiChild && mdiChild.IsMdiChild) 976Form? 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\ToolStripSettingsManager.cs (3)
15private readonly Form _form; 18internal ToolStripSettingsManager(Form owner, string formKey) 257if (controlsToLookIn[i] is null or Form)
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)
228Form? activeForm = ActiveForm;
System\Windows\Forms\ErrorProvider\ErrorProvider.cs (1)
677return 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 (58)
175/// Initializes a new instance of the <see cref="Form"/> class. 239Form? parentForm = ParentForm; 290public static Form? ActiveForm => FromHandle(PInvokeCore.GetForegroundWindow()) as Form; 300public Form? ActiveMdiChild 304Form? mdiChild = ActiveMdiChildInternal; 319mdiChild = FromHandle(hwnd) as Form; 335internal Form? ActiveMdiChildInternal 337get => Properties.GetValueOrDefault<Form>(s_propActiveMdiChild); 343private Form? FormerlyActiveMdiChild 345get => Properties.GetValueOrDefault<Form>(s_propFormerlyActiveMdiChild); 804Form? formMdiParent = Properties.GetValueOrDefault<Form>(s_propFormMdiParent); 805Form? form = formMdiParent?.ActiveMdiChildInternal; 872s_defaultIcon ??= new Icon(typeof(Form), "wfc"); 1414public Form[] MdiChildren => _ctlClient is not null ? _ctlClient.MdiChildren : ([]); 1448public Form? MdiParent 1454private Form? MdiParentInternal 1456get => Properties.GetValueOrDefault<Form>(s_propFormMdiParent); 1459Form? formMdiParent = Properties.GetValueOrDefault<Form>(s_propFormMdiParent); 1614/// Gets an array of <see cref="Form"/> objects that represent all forms that are owned by this form. 1620public Form[] OwnedForms => Properties.TryGetValue(s_propOwnedForms, out List<Form>? ownedForms) ? ([.. ownedForms]) : ([]); 1629public Form? Owner 1634Form? ownerOld = OwnerInternal; 1660internal Form? OwnerInternal => Properties.GetValueOrDefault<Form?>(s_propOwner); 2775protected void ActivateMdiChild(Form? form) 2783Form? activeMdiChild = ActiveMdiChildInternal; 2818public void AddOwnedForm(Form? ownedForm) 2831if (!Properties.TryGetValue(s_propOwnedForms, out List<Form>? ownedForms)) 3098if (Properties.TryGetValue(s_propFormMdiParent, out Form? formMdiParent) && formMdiParent.MdiClient != value) 3285Form? form = Properties.GetValueOrDefault<Form>(s_propFormMdiParent); 3378Form? activeMdiChild = ActiveMdiChildInternal; 3381Form? mdiParent = activeMdiChild.MdiParentInternal; 3398foreach (Form mdiChild in mdiParent.MdiChildren) 3483if (Properties.TryGetValue(s_propOwner, out Form? owner)) 3491if (Properties.TryGetValue(s_propOwnedForms, out List<Form>? ownedForms)) 4806if (Properties.TryGetValue(s_propOwnedForms, out List<Form>? ownedForms)) 4834if (Properties.TryGetValue(s_propOwnedForms, out List<Form>? ownedForms)) 4920public void RemoveOwnedForm(Form? ownedForm) 4934if (Properties.TryGetValue(s_propOwnedForms, out List<Form>? ownedForms)) 5065Form? form = ParentForm; 5409Form? oldOwner = OwnerInternal; 5410if (owner is Form ownerForm && owner != oldOwner) 5621Form? oldOwner = OwnerInternal; 5657if (owner is Form form && owner != oldOwner) 5989if (containerControl is Form) 6017if (Properties.TryGetValue(s_propOwner, out Form? owner)) 6118Form? activeMdiChild = ActiveMdiChildInternal; 6204Form? activeMdiForm = ActiveMdiChildInternal; 6605foreach (Form mdiChild in MdiChildren) 6630if (Properties.TryGetValue(s_propOwnedForms, out List<Form>? ownedForms)) 6685foreach (Form mdiChild in MdiChildren) 6699if (Properties.TryGetValue(s_propOwnedForms, out List<Form>? ownedForms)) 6836if (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)
10/// Specifies the corner preference for a <see cref="Form"/> which can be 11/// 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)
18foreach (Form openForm in Application.OpenForms)
System\Windows\Forms\Layout\Containers\ContainerControl.cs (4)
364public Form? ParentForm 373if (this is Form) 495Form? f = FindForm(); 562Form? 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 = []; 125public Form[] MdiChildren 223|| ParentInternal is Form { MdiChildrenMinimizedAnchorBottom: false } 247if (Controls[i] is Form child && child.CanRecreateHandle() && child.WindowState == FormWindowState.Minimized) 342Form? childForm = null; 343if (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(); 1865Form? 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; 450if (TopLevelControl is Form form)
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.cs (1)
417DialogResult IWindowsFormsEditorService.ShowDialog(Form dialog)
System\Windows\Forms\Design\CollectionEditVerbManager.cs (1)
169DialogResult IWindowsFormsEditorService.ShowDialog(Form dialog)
System\Windows\Forms\Design\DataGridViewDesigner.cs (1)
796private DialogResult ShowDialog(Form dialog)
System\Windows\Forms\Design\DesignerFrame.cs (1)
101if (_designer is Form form)
System\Windows\Forms\Design\DocumentDesigner.cs (3)
554else if (autoSize && (mode == AutoSizeMode.GrowAndShrink) && !(Control is Form)) 900if (cd.Control is not Form form || !form.TopLevel) 956&& !(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)
111if (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)) 2398if (c is not Form form || !form.TopLevel)
System\Windows\Forms\Design\ToolStripDesigner.cs (2)
1475Form parentForm = _host.RootComponent as Form;
System.Windows.Forms.Design.Tests (39)
BinaryEditorTests.cs (2)
18editorService.Setup(e => e.ShowDialog(It.IsAny<Form>())) 19.Callback<Form>(f => { f.Show(); f.Close(); })
System\ComponentModel\Design\CollectionEditorTests.cs (21)
105Form form = editor.CreateCollectionForm(); 153.Setup(s => s.ShowDialog(It.IsAny<Form>())) 196.Setup(s => s.ShowDialog(It.IsAny<Form>())) 244.Setup(s => s.ShowDialog(It.IsAny<Form>())) 294.Setup(s => s.ShowDialog(It.IsAny<Form>())) 409.Setup(s => s.ShowDialog(It.IsAny<Form>())) 446.Setup(s => s.ShowDialog(It.IsAny<Form>())) 523.Setup(s => s.ShowDialog(It.IsAny<Form>())) 547mockEditorService.Verify(s => s.ShowDialog(It.IsAny<Form>()), Times.Once()); 556.Setup(s => s.ShowDialog(It.IsAny<Form>())) 588mockEditorService.Verify(s => s.ShowDialog(It.IsAny<Form>()), Times.Once()); 596.Setup(s => s.ShowDialog(It.IsAny<Form>())) 634mockEditorService.Verify(s => s.ShowDialog(It.IsAny<Form>()), Times.Once()); 643.Setup(s => s.ShowDialog(It.IsAny<Form>())) 681mockEditorService.Verify(s => s.ShowDialog(It.IsAny<Form>()), Times.Once()); 690.Setup(s => s.ShowDialog(It.IsAny<Form>())) 724mockEditorService.Verify(s => s.ShowDialog(It.IsAny<Form>()), Times.Once()); 841.Setup(s => s.ShowDialog(It.IsAny<Form>())) 945.Setup(s => s.ShowDialog(It.IsAny<Form>())) 988.Setup(s => s.ShowDialog(It.IsAny<Form>())) 1040public new Form CreateCollectionForm() => base.CreateCollectionForm();
System\ComponentModel\Design\CollectionFormTests.cs (12)
110.Setup(s => s.ShowDialog(It.IsAny<Form>())) 166.Setup(s => s.ShowDialog(It.IsAny<Form>())) 225.Setup(s => s.ShowDialog(It.IsAny<Form>())) 284.Setup(s => s.ShowDialog(It.IsAny<Form>())) 343.Setup(s => s.ShowDialog(It.IsAny<Form>())) 391.Setup(s => s.ShowDialog(It.IsAny<Form>())) 503.Setup(s => s.ShowDialog(It.IsAny<Form>())) 547.Setup(s => s.ShowDialog(It.IsAny<Form>())) 596.Setup(s => s.ShowDialog(It.IsAny<Form>())) 647.Setup(s => s.ShowDialog(It.IsAny<Form>())) 718.Setup(s => s.ShowDialog(It.IsAny<Form>())) 762.Setup(s => s.ShowDialog(It.IsAny<Form>()))
System\Resources\Tools\StronglyTypedResourceBuilderTests.cs (1)
611using Form form = new();
System\Windows\Forms\Design\InheritanceUITests.cs (1)
16private readonly Form _form;
System\Windows\Forms\Design\MaskedTextBoxTextEditorTests.cs (1)
24.Setup(s => s.ShowDialog(It.IsAny<Form>()))
TreeNodeCollectionEditorTests.cs (1)
30Form colletionForm;
System.Windows.Forms.IntegrationTests.Common (1)
TestHelpers.cs (1)
381public static void BringToForeground(this Form form)
System.Windows.Forms.Tests (260)
NumericUpDownTests.cs (3)
28using Form form = new(); 71using Form form = new(); 107using Form form = new();
System\Resources\ResXSerializationBinderTests.cs (7)
40binder.BindToType(typeof(Form).Assembly.FullName!, typeof(Form).FullName!).Should().Be(typeof(Form)); 88TypeName parsed = TypeName.Parse($"{typeof(Form).FullName}, {typeof(Form).Assembly.FullName}"); 90string formNoVersionFullyQualifiedName = $"{typeof(Form).FullName}, {new AssemblyNameInfo( 99return typeof(Form);
System\Windows\Forms\AccessibleObjects\AccessibleObjectTests.cs (5)
543using Form form = new(); 571using Form form = new(); 594using Form form = new(); 2617using Form form = new(); 2649using Form form = new();
System\Windows\Forms\AccessibleObjects\Control.ControlAccessibleObjectTests.cs (2)
1674using Form form = new(); 1730or Form
System\Windows\Forms\AccessibleObjects\DataGridViewAccessibleObjectTests.cs (1)
548using Form form = new();
System\Windows\Forms\AccessibleObjects\DateTimePicker.DateTimePickerAccessibleObjectTests.cs (1)
350using Form form = new();
System\Windows\Forms\AccessibleObjects\ErrorProviderAccessibleObjectTests.cs (1)
11private readonly Form _form;
System\Windows\Forms\AccessibleObjects\Form.FormAccessibleObjectTests.cs (13)
7using static System.Windows.Forms.Form; 16using Form form = new(); 26using Form form = new(); 40using Form form = new(); 58using Form form = new(); 92using Form form = new(); 105using Form form = new(); 120using Form form = new FocusEventsCounterForm(); 146using Form form = new FocusEventsCounterForm(); 172using Form form = new(); 191using Form form = new(); 192using Form embeddedForm = new() { TopLevel = false }; 214public FocusEventsCounterFormAccessibleObject(Form owner) : base(owner)
System\Windows\Forms\AccessibleObjects\ListBox.ListBoxItemAccessibleObjectTests.cs (1)
18using Form form = new()
System\Windows\Forms\AccessibleObjects\ListBoxAccessibleObjectTests.cs (2)
135using Form form = new(); 346using Form form = new();
System\Windows\Forms\AccessibleObjects\ListViewGroup.ListViewGroupAccessibleObjectTests.cs (2)
275using Form form = new(); 318using Form form = new();
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewItemAccessibleObjectTests.cs (1)
1616imageCollection.Images.Add(Form.DefaultIcon);
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewItemDetailsAccessibleObjectTests.cs (3)
144imageList.Images.Add(Form.DefaultIcon); 184using Form form = new(); 214using Form form = new();
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewItemImageAccessibleObjectTests.cs (2)
15imageCollection.Images.Add(Form.DefaultIcon); 40imageCollection.Images.Add(Form.DefaultIcon);
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewItemWithImageAccessibleObjectTests.cs (3)
31imageCollection.Images.Add(Form.DefaultIcon); 76imageCollection.Images.Add(Form.DefaultIcon); 113imageCollection.Images.Add(Form.DefaultIcon);
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewSubItem.ListViewSubItemAccessibleObjectTests.cs (1)
998imageCollection.Images.Add(Form.DefaultIcon);
System\Windows\Forms\AccessibleObjects\Panel.PanelAccessibleObjectTests.cs (1)
259using Form form = new();
System\Windows\Forms\AccessibleObjects\TabPage.TabPageAccessibleObjectTests.cs (1)
526using Form form = new();
System\Windows\Forms\AccessibleObjects\ToolStripMenuItem.ToolStripMenuItemAccessibleObjectTests.cs (1)
55foreach (Form form in Application.OpenForms)
System\Windows\Forms\Application.ParkingWindowTests.cs (3)
18Form form = InitFormWithControlToGarbageCollect(); 37private Form InitFormWithControlToGarbageCollect() 39Form form = new();
System\Windows\Forms\ApplicationContextTests.cs (8)
25public void Ctor_Form(Form mainForm) 35public void MainForm_Set_GetReturnsExpected(Form value) 50public void MainForm_SetWithNonNullOldValue_GetReturnsExpected(Form value) 171using Form mainForm = new(); 185using Form mainForm = new(); 248using Form mainForm = new(); 262using Form mainForm = new(); 403public SubApplicationContext(Form mainForm) : base(mainForm)
System\Windows\Forms\ApplicationTests.cs (11)
389using Form mainForm = new Form(); 420void AddMDI(Form mdiParent) 444var child = new Form 454formClosingProcessed[(sender as Form).MdiParent]++; 462formClosedProcessed[(sender as Form).MdiParent]++; 476/// Count of forms that we will remove during last form <see cref="Form.OnFormClosing(FormClosingEventArgs)"/>. 479/// Count of forms that we will add during last form <see cref="Form.OnFormClosing(FormClosingEventArgs)"/>. 527using Form mainForm = new Form(); 530Form lastChild = null; 559Form other = new Form() { Text = "Child" }; 625Form add = new Form() { Text = "Add" };
System\Windows\Forms\AxHost.VisualBasic6Tests.cs (1)
20using Form form = new();
System\Windows\Forms\AxSystemMonitorTests.cs (1)
11private readonly Form _form;
System\Windows\Forms\AxWebBrowserTests.cs (1)
12private readonly Form _form;
System\Windows\Forms\ButtonRenderingTests.cs (1)
214using Form form = new();
System\Windows\Forms\ButtonTests.cs (4)
1934using Form form = new(); 2016using Form form = new(); 3118using Form form = new(); 3196using Form form = new();
System\Windows\Forms\CheckBoxRendererTests.cs (4)
18using Form form = new(); 54using Form form = new(); 91using Form form = new(); 127using Form form = new();
System\Windows\Forms\CheckBoxTests.cs (2)
815using Form form = new(); 845using Form form = new();
System\Windows\Forms\ControlBindingsCollectionTests.cs (1)
90using Form control = new();
System\Windows\Forms\ControlTests.cs (4)
925using Form form = new() { RightToLeft = rightToLeft, }; 982using Form form = new() { RightToLeft = rightToLeft }; 1037using Form form = new(); 1097using Form form = new();
System\Windows\Forms\ControlTests.Internals.cs (1)
415using Form form = new();
System\Windows\Forms\ControlTests.Methods.cs (1)
1967Form form = new();
System\Windows\Forms\DataGridViewCellTests.cs (7)
200using Form form = new(); 843using Form form = new(); 879using Form form = new(); 4047using Form form = new(); 4090using Form form = new(); 4354using Form form = new(); 5146using Form form = new();
System\Windows\Forms\DataGridViewHeaderCellTests.cs (2)
2416using Form form = new(); 3683using Form form = new();
System\Windows\Forms\DataGridViewRowTests.cs (8)
108using Form form = new(); 326using Form form = new(); 353using Form form = new(); 941using Form form = new(); 1871using Form form = new(); 2340using Form form = new(); 4332using Form form = new(); 4457using Form form = new();
System\Windows\Forms\DataGridViewTests.cs (1)
2321using Form form = new Form
System\Windows\Forms\DataGridViewTests.Rendering.cs (2)
16using Form form = new(); 105using Form form = new Form
System\Windows\Forms\ErrorProviderTests.cs (1)
1315using Form form = new();
System\Windows\Forms\Form.ControlCollectionTests.cs (3)
11using Form owner = new(); 12Form.ControlCollection collection = new(owner); 22Assert.Throws<ArgumentNullException>("owner", () => new Form.ControlCollection(null));
System\Windows\Forms\FormTests.cs (98)
193using Form form = new(); 210using Form form = new(); 223using Form form = new() 251using Form form = new(); 252using Form child = new(); 263using Form form = new(); 264using Form child = new() 279using Form form = new(); 280using Form child = new() 294using Form form = new(); 295using Form child = new() 310using Form control = new() 344using Form control = new() 374using Form control = new() 404using Form control = new(); 453using Form control = new() 501using Form control = new() 549using Form form = new() 566using Form form = new() 581using Form form = new() 596using Form form = new() 623using Form control = new() 657using Form control = new() 680using Form control = new() 712using Form control = new(); 748using Form control = new() 794using Form control = new(); 839using Form control = new(); 889using Form control = new() 933using Form control = new() 954using Form control = new() 982using Form form = new(); 1011using Form form = new(); 1037using Form form = new(); 1051using Form form = new(); 1074using Form oldParent = new() 1078using Form control = new() 1100using Form control = new() 1120using Form control = new() 1154using Form control = new() 1192using Form control = new() 1203using Form control = new(); 1212using Form oldParent = new() 1216using Form control = new() 1220using Form parent = new(); 1229using Form parent = new(); 1236using Form control = new(); 1238control.Icon = Form.DefaultIcon; 1278using Form control = new() 1310using Form control = new() 1344using Form control = new() 1377using Form control = new() 1399using Form control = new() 1421using Form control = new(); 1460using Form control = new(); 1492using Form control = new() 1534using Form control = new() 1569using Form control = new(); 1603using Form control = new(); 1636using Form control = new() 1672using Form control = new() 1707using Form control = new(); 1741using Form control = new(); 1786using Form control = new() 1824using Form form = new() 1862using Form control = new() 1901using Form parent = new() 1906using Form control = new() 1935using Form control = new() 1983using Form parent = new() 1988using Form control = new() 2035using Form parent = new() 2040using Form control = new() 2087using Form parent = new() 2091using Form control = new() 2129using Form control = new() 2184using Form parent = new() 2189using Form control = new() 2237using Form parent = new() 2241using Form control = new() 2290using Form control = new() 2348using Form control = new() 2574yield return new Action<Form, Control>[] 2576(Form form, Control control) => form.Show(owner: control) 2578yield return new Action<Form, Control>[] 2580(Form form, Control control) => form.ShowDialog(owner: control) 2584yield return new Action<Form, Control>[] 2586(Form form, Control control) => form.Show(owner: control.FindForm()) 2588yield return new Action<Form, Control>[] 2590(Form form, Control control) => form.ShowDialog(owner: control.FindForm()) 2596public void Form_Show_SetsOwnerToTopLevelForm_WhenShownWithOwner(Action<Form, Control> showAction) 2600using Form parent = new(); 2605using Form child = new(); 2606Form owner = null; 2609owner = ((Form)sender).Owner; 2631using Form parent = new() { IsMdiContainer = true }; 2632using Form mdiChild = new() { MdiParent = parent }; 2670public ParentingForm(Form targetForm)
System\Windows\Forms\LabelTests.cs (1)
288using Form form = new();
System\Windows\Forms\ListViewTests.cs (2)
5050imagecollection.Images.Add(Form.DefaultIcon); 5051imagecollection.Images.Add(Form.DefaultIcon);
System\Windows\Forms\MdiControlStripTests.cs (11)
17using Form form = new(); 157using Form form = new(); 175using Form form = new(); 202using Form mdiParent = new() 209using Form mdiChild = new() 248using Form mdiParent = new() 255using Form mdiChild = new() 293using Form mdiParent = new() { IsMdiContainer = true }; 294using Form mdiChild = new() 315using Form mdiParent = new() { IsMdiContainer = true, Text = "Parent" }; 316using Form mdiChild = new() { MdiParent = mdiParent, Text = "Child" };
System\Windows\Forms\MixedDpiHostingTests.cs (1)
24using Form form = new();
System\Windows\Forms\NativeWindowTests.cs (1)
29using Form control = new();
System\Windows\Forms\RadioButtonRendererTests.cs (4)
17using Form form = new Form(); 48using Form form = new Form(); 85using Form form = new Form(); 106using Form form = new Form();
System\Windows\Forms\ScrollBarTests.cs (2)
3107Form form = new(); 3126Form form = new();
System\Windows\Forms\StatusStripTests.Rendering.cs (1)
14using Form form = new();
System\Windows\Forms\TextBoxRendererTests.cs (3)
24using Form form = new(); 53using Form form = new(); 88using Form form = new();
System\Windows\Forms\ToolStripButtonTests.Rendering.cs (6)
14using Form form = new(); 40using Form form = new(); 66using Form form = new(); 92using Form form = new(); 118using Form form = new(); 145using Form form = new();
System\Windows\Forms\ToolStripMenuItemTests.cs (2)
114using Form form = new(); 258Form? mdiForm1 = null;
System\Windows\Forms\ToolStripPanelRow.ToolStripPanelRowControlCollectionTests.cs (1)
14using Form form = new();
System\Windows\Forms\ToolStripSettingsManagerTests.cs (1)
11using Form mainForm = new();
System\Windows\Forms\ToolStripTests.cs (2)
1626using Form form = new(); 1646using Form form = new();
System\Windows\Forms\ToolStripTests.Rendering.cs (1)
14using Form form = new();
System\Windows\Forms\ToolTipTests.cs (2)
836using Form form = new(); 877using Form form = new();
System\Windows\Forms\VisualStyles\VisualStyleRendererTests.cs (1)
503using Form form = new();
System\Windows\Forms\WebBrowserTests.cs (1)
4758using Form form = new();
TextBoxTests.Rendering.cs (1)
16using Form form = new();
System.Windows.Forms.UI.IntegrationTests (73)
AnchorLayoutTests.cs (11)
54(Form form, Button button) = GetFormWithAnchoredButton(AnchorAllDirection); 78(Form form, Button button) = GetFormWithAnchoredButton(AnchorAllDirection); 99(Form form, Button button) = GetFormWithAnchoredButton(AnchorAllDirection); 124(Form form, Button button) = GetFormWithAnchoredButton(AnchorAllDirection); 143(Form form, Button button) = GetFormWithAnchoredButton(AnchorAllDirection); 172(Form form, Button button) = GetFormWithAnchoredButton(AnchorAllDirection); 209(Form form, Button button) = GetFormWithAnchoredButton(AnchorAllDirection); 241(Form form, Button button) = GetFormWithAnchoredButton(anchors); 271private static (Form, Button) GetFormWithAnchoredButton(AnchorStyles buttonAnchors) 273Form form = new() 292private static void Dispose(Form form, Button button)
ApplicationTests.cs (2)
22using Form child = new() { RightToLeft = RightToLeft.No }; 40private async Task RunTestAsync(Func<Form, Task> runTest)
ButtonTests.cs (1)
395private async Task RunTestAsync(Func<Form, Button, Task> runTest)
DataGridViewTests.cs (1)
73private async Task RunTestAsync(Func<Form, DataGridView, Task> runTest)
DesignBehaviorsTests.cs (4)
70if (e.Component is Form form) 121async Task InitiateDrangDropAsync(Form form, Point startCoordinates, Control rootView) 308LoaderHost.CreateComponent(typeof(Form)); 310LoaderHost.EndLoad(nameof(Form), true, errors);
Dpi\FormDpiTests.cs (7)
30using Form form = new(); 69using Form form = new(); 103using Form form = new(); 137using Form form = new(); 173using Form form = new(); 205using Form form = new(); 233using Form form = new();
Dpi\SplitContainerTests.cs (1)
45using Form form = new();
Dpi\ToolStripItemTests.Dpi.cs (1)
34using Form form = new();
DragDropTests.cs (1)
854Form form = lb.FindForm()!;
FormTests.cs (2)
142private async Task RunEmptyFormTestAsync(Func<Form, Task> testDriverAsync) 147Form form = new()
ImageListTests.cs (3)
92using Form form = CreateForm(); 97private Form CreateForm() 109Form form = new()
Infra\ControlTestBase.cs (12)
189protected async Task MoveMouseAsync(Form window, Point point, bool assertCorrectLocation = true) 224protected async Task RunSingleControlTestAsync<T>(Func<Form, T, Task> testDriverAsync) 230Form form = new() 243protected async Task RunSingleControlTestAsync<T>(Func<Form, T, Task> testDriverAsync, Func<T> createControl, Func<Form>? createForm = null) 249Form form; 271protected async Task RunControlPairTestAsync<T1, T2>(Func<Form, (T1 control1, T2 control2), Task> testDriverAsync) 278Form form = new() 300protected async Task RunFormAsync<T>(Func<(Form dialog, T control)> createDialog, Func<Form, T, Task> testDriverAsync) 304Form? dialog = null; 345where TForm : Form
Infra\ScreenRecordService.cs (2)
29private Form? _form; 562public void RegisterEvents(Form form)
Infra\SendInput.cs (3)
19internal async Task SendAsync(Form window, params object[] keys) 70internal async Task SendAsync(Form window, Action<InputSimulator> actions) 80private static void SetForegroundWindow(Form window)
ListBoxAccesibleObjectTests.cs (3)
14using Form form = new(); 35using Form form = new(); 49using Form form = new();
ListBoxItemAccessibleObjestTests.cs (3)
14using Form form = new(); 37using Form formDoubleClick = new(); 52using Form form = new();
ListViewTests.cs (1)
565private async Task RunTestAsync(Func<Form, ListView, Task> runTest)
MDITests.cs (3)
21using Form childForm = new() 43using Form childForm = new() 61private async Task RunTestAsync(Func<Form, Task> runTest)
MenuStripTests.cs (1)
14using Form form = new();
MonthCalendarAccessibleObjectTests.cs (1)
38private async Task RunTestAsync(Func<Form, MonthCalendar, Task> runTest)
MonthCalendarTests.cs (4)
181private async Task ClickOnDateAsync(Form form, MonthCalendar calendar, DateTime date) 189private async Task ClickOnDateTwiceAsync(Form form, MonthCalendar calendar, DateTime date) 200private async Task RunClickTestAsync(Func<Form, MonthCalendar, Task> runTest) 224private async Task RunTestAsync(Func<Form, MonthCalendar, Task> runTest)
PropertyGridTests.cs (1)
17private readonly Form _form;
RichTextBoxTests.cs (1)
234private async Task RunTestAsync(Func<Form, RichTextBox, Task> runTest)
TabControlTests.cs (2)
67private async Task<bool> IsHoveredWithMouseAsync(Form form, TabControl tabControl, Point point, bool assertCorrectLocation = true) 77private async Task RunTestAsync(Func<Form, TabControl, Task> runTest)
ToolStripTests.cs (2)
31using Form form = new(); 67using Form form = new();
VisualBasicRuntimeTest (6)
Program.cs (6)
81Form mainForm = new(); 131var dialog = (Form)Activator.CreateInstance(dialogType, nonPublic: true); 155var form = (Form)Activator.CreateInstance(formType, nonPublic: true); 177internal WindowsApplication(Form mainForm, bool isSingleInstance)
WindowsFormsIntegration (2)
System\Windows\Integration\WindowsFormsHost.cs (2)
320SWF.Form form = value as SWF.Form;
WinFormsControlsTest (9)
Dialogs.cs (1)
48if (propertyGrid1.SelectedObject is Form form)
FormOwnerTestForm.cs (3)
28List<Form> childForms = []; 58public Form CreateChildFormWithMemory() 63Form child = new();
FormShowInTaskbar.cs (1)
31using Form form = new()
MdiChild.cs (1)
28Form frm = new()
MdiParent.cs (1)
22Form child = new()
RichTextBoxes.cs (2)
117public static string ShowDialog(Form owner, string text, string caption) 119Form prompt = new()