589 references to SystemInformation
Microsoft.VisualBasic.Forms (5)
Microsoft\VisualBasic\Devices\Mouse.vb (5)
29If SystemInformation.MousePresent Then 30Return SystemInformation.MouseButtonsSwapped 44If SystemInformation.MousePresent Then 45Return SystemInformation.MouseWheelPresent 60Return SystemInformation.MouseWheelScrollLines
Microsoft.VisualBasic.Tests (13)
Microsoft\VisualBasic\Devices\MouseTests.cs (13)
10public static bool NoMousePresent => !SystemInformation.MousePresent; 12public static bool NoMouseWheelPresent => NoMousePresent || !SystemInformation.MouseWheelPresent; 14[ConditionalFact(typeof(SystemInformation), nameof(SystemInformation.MousePresent))] 18Assert.Equal(SystemInformation.MouseButtonsSwapped, mouse.ButtonsSwapped); 32[ConditionalFact(typeof(SystemInformation), nameof(SystemInformation.MousePresent))] 36Assert.Equal(SystemInformation.MouseWheelPresent, mouse.WheelExists); 50[ConditionalFact(typeof(SystemInformation), nameof(SystemInformation.MousePresent), nameof(SystemInformation.MouseWheelPresent))] 53if (SystemInformation.MouseWheelPresent) 56Assert.Equal(SystemInformation.MouseWheelScrollLines, mouse.WheelScrollLines);
System.Windows.Forms (208)
System\Windows\Forms\Application.cs (2)
397!SystemInformation.HighContrast && OsVersion.IsWindows11_OrGreater(); 405!SystemInformation.HighContrast
System\Windows\Forms\Application.ThreadContext.cs (2)
615if (SystemInformation.UserInteractive) 699if (reason == msoloop.ModalForm && !SystemInformation.UserInteractive)
System\Windows\Forms\Control.cs (2)
3268if (SystemInformation.MenuAccessKeysUnderlined) 3314if (SystemInformation.MenuAccessKeysUnderlined)
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.ColorOptions.cs (1)
24HighContrast = SystemInformation.HighContrast;
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.cs (7)
69protected bool IsHighContrastHighlighted() => SystemInformation.HighContrast 105if (Control.BackColor != SystemColors.Control && SystemInformation.HighContrast) 132bool disabledHighContrast = (!Control.Enabled) && SystemInformation.HighContrast; 164? SystemInformation.HighContrast ? SystemColors.ControlLight : SystemColors.Control 165: SystemInformation.HighContrast ? colors.Highlight : colors.ButtonFace); 235bool disabledHighContrast = (!Control.Enabled) && SystemInformation.HighContrast; 273: SystemInformation.HighContrast ? SystemColors.ControlLight : SystemColors.Control);
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonFlatAdapter.cs (9)
28|| (SystemInformation.HighContrast ? state != CheckState.Indeterminate : state == CheckState.Unchecked), 29check: !hasCustomBorder && SystemInformation.HighContrast && state == CheckState.Checked, 99else if (state == CheckState.Checked && SystemInformation.HighContrast) 121|| (SystemInformation.HighContrast ? state != CheckState.Indeterminate : state == CheckState.Unchecked), 122!hasCustomBorder && SystemInformation.HighContrast && state == CheckState.Checked, 187else if (state == CheckState.Checked && SystemInformation.HighContrast) 204if (SystemInformation.HighContrast) 313layout.ShadowedText = SystemInformation.HighContrast; 325layout.ShadowedText = SystemInformation.HighContrast;
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonPopupAdapter.cs (5)
62LayoutData layout = PaintPopupLayout(state == CheckState.Unchecked, SystemInformation.HighContrast ? 2 : 1).Layout(); 86if (SystemInformation.HighContrast) 120LayoutData layout = PaintPopupLayout(up: false, SystemInformation.HighContrast ? 2 : 1).Layout(); 165layout.ShadowedText = SystemInformation.HighContrast; 181layout.ShadowedText = SystemInformation.HighContrast;
System\Windows\Forms\Controls\Buttons\ButtonInternal\CheckBoxBaseAdapter.cs (2)
100Color comboColor = SystemInformation.HighContrast ? SystemColors.ControlDark : SystemColors.Control; 168checkColor = SystemInformation.HighContrast ? colors.Highlight : colors.ButtonShadow;
System\Windows\Forms\Controls\Buttons\ButtonInternal\RadioButtonBaseAdapter.cs (1)
66if (!SystemInformation.HighContrast)
System\Windows\Forms\Controls\Buttons\CheckBoxRenderer.cs (1)
344if (SystemInformation.HighContrast
System\Windows\Forms\Controls\Buttons\RadioButtonRenderer.cs (1)
322if (SystemInformation.HighContrast
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (5)
775_prefHeightCache = (short)(textSize.Height + SystemInformation.BorderSize.Height * 8 + Padding.Size.Height); 792_prefHeightCache = (short)(textSize.Height * itemCount + SystemInformation.BorderSize.Height * 16 + Padding.Size.Height); 825int dyEdit = textExtent.Height + SystemInformation.Border3DSize.Height; 836Size fixedFrameBoderSize = SystemInformation.FixedFrameBorderSize; 3734&& !(SystemInformation.HighContrast && BackColor == SystemColors.Window))
System\Windows\Forms\Controls\ComboBox\ComboBox.FlatComboAdapter.cs (1)
32int dropDownButtonWidth = SystemInformation.GetHorizontalScrollBarArrowWidthForDpi(comboBox._deviceDpi);
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (4)
229private static readonly Size s_dragSize = SystemInformation.DragSize; 1115return Application.RenderWithVisualStyles ? 1 : SystemInformation.Border3DSize.Width; 1990defaultCellStyleTmp.ForeColor = SystemInformation.HighContrast ? DefaultForeBrush.Color : base.ForeColor; 2054ForeColor = SystemInformation.HighContrast ? DefaultForeBrush.Color : base.ForeColor,
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (11)
940&& SystemInformation.VerticalScrollBarWidth <= _layout.Data.Width) 943availableWidth -= SystemInformation.VerticalScrollBarWidth; 4542int oldThumbHeight = Math.Max(((_vertScrollBar.Height - 2 * SystemInformation.VerticalScrollBarArrowHeight) * _vertScrollBar.LargeChange) / _vertScrollBar.Maximum, 8); 4553(_vertScrollBar.Height - 2 * SystemInformation.VerticalScrollBarArrowHeight) * _vertScrollBar.LargeChange / _vertScrollBar.Maximum, 5779&& (DateTime.Now.Ticks - _lastMouseClickInfo.TimeStamp) / 10000 <= SystemInformation.DoubleClickTime 5785Size hotDoubleClickZone = SystemInformation.DoubleClickSize; 10168int horizScrollBarHeight = _horizScrollBar.Height = SystemInformation.HorizontalScrollBarHeight; 10169int vertScrollBarWidth = _vertScrollBar.Width = SystemInformation.VerticalScrollBarWidth; 16479int wheelScrollLines = SystemInformation.MouseWheelScrollLines; 16713if (SystemInformation.HighContrast) 30050PInvokeCore.SendMessage(nmhdr->hwndFrom, PInvoke.TTM_SETMAXTIPWIDTH, 0, SystemInformation.MaxWindowTrackSize.Width);
System\Windows\Forms\Controls\DataGridView\DataGridViewButtonCell.cs (6)
757valBounds.Inflate(-SystemInformation.Border3DSize.Width, -SystemInformation.Border3DSize.Height); 884valBounds.Width > 2 * SystemInformation.Border3DSize.Width + 1 && 885valBounds.Height > 2 * SystemInformation.Border3DSize.Height + 1) 907SystemInformation.HighContrast, 938SystemInformation.HighContrast ? 2 : 1,
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (1)
1439if (SystemInformation.HighContrast)
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.cs (3)
701_ => SystemInformation.Border3DSize.Width * 2 + 9 + 2 * DATAGRIDVIEWCHECKBOXCELL_margin, 1202checkBoxSize = new Size(SystemInformation.Border3DSize.Width * 2 + 9, SystemInformation.Border3DSize.Width * 2 + 9);
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (8)
546int dropWidth = Math.Min(SystemInformation.HorizontalScrollBarThumbWidth, adjustedSize.Width - 2 * Margin - 1); 614s_cachedDropDownWidth = maxPreferredWidth + 2 + SystemInformation.VerticalScrollBarWidth; 1197preferredSize.Width += SystemInformation.HorizontalScrollBarThumbWidth + 1 + (2 * Margin) + borderAndPaddingWidths; 1203borderAndPaddingWidths + SystemInformation.HorizontalScrollBarThumbWidth + 1 + (IconMarginWidth * 2) + s_iconsWidth); 1992int dropWidth = Math.Min(SystemInformation.HorizontalScrollBarThumbWidth, valBounds.Width - 2 * Margin - 1); 2068if (SystemInformation.HighContrast) 2090Pen pen = SystemInformation.HighContrast ? SystemPens.ControlLight : SystemPens.Control; 2326if (paintPostXPThemes && (drawDropDownButton || drawComboBox) && !SystemInformation.HighContrast)
System\Windows\Forms\Controls\DataGridView\DataGridViewLinkCell.cs (6)
51else if (SystemInformation.HighContrast) 94if (SystemInformation.HighContrast) 159else if (SystemInformation.HighContrast) 200private bool ShouldSerializeLinkColor() => SystemInformation.HighContrast 296else if (SystemInformation.HighContrast) 341if (SystemInformation.HighContrast)
System\Windows\Forms\Controls\DataGridView\DataGridViewLinkColumn.cs (3)
68if (SystemInformation.HighContrast) 179if (SystemInformation.HighContrast) 359if (SystemInformation.HighContrast)
System\Windows\Forms\Controls\DataGridView\DataGridViewRowCollection.cs (2)
2041GetRowsHeightExceedLimit(DataGridViewElementStates.Visible, 0, rowIndex, DataGridView.LayoutInfo.Data.Height + SystemInformation.HorizontalScrollBarHeight); 2053useRowShortcut = GetRowsHeightExceedLimit(DataGridViewElementStates.Visible, 0, rowIndex, DataGridView.LayoutInfo.Data.Height + DataGridView.VerticalScrollingOffset + SystemInformation.HorizontalScrollBarHeight) &&
System\Windows\Forms\Controls\DataGridView\DataGridViewRowHeaderCell.cs (1)
1039if (SystemInformation.HighContrast &&
System\Windows\Forms\Controls\DateTimePicker\DateTimePicker.cs (1)
750height += SystemInformation.BorderSize.Height * 4 + 3;
System\Windows\Forms\Controls\GroupBox\GroupBox.cs (1)
545if (SystemInformation.HighContrast)
System\Windows\Forms\Controls\GroupBox\GroupBoxRenderer.cs (1)
361if (SystemInformation.HighContrast
System\Windows\Forms\Controls\Labels\LinkLabel.cs (2)
238? SystemInformation.HighContrast ? SystemColors.HotTrack : IELinkColor 349? SystemInformation.HighContrast ? LinkUtilities.GetVisitedLinkColor() : IEVisitedLinkColor
System\Windows\Forms\Controls\ListBoxes\ListBox.cs (2)
750height += SystemInformation.BorderSize.Height * 4 + 3; 769width += SystemInformation.VerticalScrollBarWidth + 4;
System\Windows\Forms\Controls\ListView\ListView.cs (1)
6822PInvokeCore.SendMessage(nmhdr->hwndFrom, PInvoke.TTM_SETMAXTIPWIDTH, (WPARAM)0, (LPARAM)SystemInformation.MaxWindowTrackSize.Width);
System\Windows\Forms\Controls\Menus\MenuTimer.cs (1)
23_slowShow = Math.Max(_quickShow, SystemInformation.MenuShowDelay);
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.cs (1)
1654Size max = SystemInformation.MaxWindowTrackSize;
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (2)
73private Color _lineColor = SystemInformation.HighContrast ? SystemColors.ControlDarkDark : SystemColors.InactiveBorder; 3811if (DrawFlatToolbar || SystemInformation.HighContrast)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\CategoryGridEntry.cs (1)
122if (SystemInformation.HighContrast && !OwnerGrid.HasCustomLineColor)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\DropDownButton.DropDownButtonAdapter.cs (1)
18if (Control.BackColor != SystemColors.Control && SystemInformation.HighContrast)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntry.cs (1)
107=> SystemInformation.HighContrast && !OwnerGrid.HasCustomLineColor;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridToolTip.cs (1)
142(LPARAM)SystemInformation.MaxWindowTrackSize.Width);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (14)
217? new(SystemInformation.VerticalScrollBarArrowHeightForDpi(_deviceDpi), RowHeight) 218: new(SystemInformation.VerticalScrollBarArrowHeight, RowHeight); 255? new Size(SystemInformation.VerticalScrollBarArrowHeightForDpi(_deviceDpi), RowHeight) 256: new Size(SystemInformation.VerticalScrollBarArrowHeight, RowHeight); 2592if (delta < SystemInformation.DoubleClickTime) 2596if (Math.Abs(screenPoint.X - _rowSelectPos.X) < SystemInformation.DoubleClickSize.Width && 2597Math.Abs(screenPoint.Y - _rowSelectPos.Y) < SystemInformation.DoubleClickSize.Height) 3123int wheelScrollLines = SystemInformation.MouseWheelScrollLines; 3715maxWidth += 2 + tm.tmMaxCharWidth + SystemInformation.VerticalScrollBarWidth; 3791int overhang = toolTip.Location.X + toolTip.Size.Width - SystemInformation.VirtualScreen.Width; 4322? new Size(SystemInformation.VerticalScrollBarArrowHeightForDpi(_deviceDpi), RowHeight) 4323: new Size(SystemInformation.VerticalScrollBarArrowHeight, RowHeight); 5138_dropDownButton.Size = new(SystemInformation.VerticalScrollBarArrowHeightForDpi(_deviceDpi), RowHeight); 5142_dropDownButton.Size = new(SystemInformation.VerticalScrollBarArrowHeight, RowHeight);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.DropDownHolder.cs (3)
31private static readonly int s_resizeGripSize = SystemInformation.HorizontalScrollBarHeight; 41new(SystemInformation.VerticalScrollBarWidth * 4, SystemInformation.HorizontalScrollBarHeight * 4);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridToolStripButton.cs (1)
76if (SystemInformation.HighContrast)
System\Windows\Forms\Controls\RichTextBox\RichTextBox.cs (2)
433scrollBarPadding.Height += SystemInformation.HorizontalScrollBarHeight; 438scrollBarPadding.Width += SystemInformation.VerticalScrollBarWidth;
System\Windows\Forms\Controls\TabControl\TabControl.cs (1)
2093PInvokeCore.SendMessage(nmhdr->hwndFrom, PInvoke.TTM_SETMAXTIPWIDTH, 0, SystemInformation.MaxWindowTrackSize.Width);
System\Windows\Forms\Controls\TextBox\TextBox.cs (2)
407scrollBarPadding.Height += SystemInformation.GetHorizontalScrollBarHeightForDpi(_deviceDpi); 412scrollBarPadding.Width += SystemInformation.GetVerticalScrollBarWidthForDpi(_deviceDpi);
System\Windows\Forms\Controls\TextBox\TextBoxBase.cs (1)
803height += SystemInformation.GetBorderSizeForDpi(_deviceDpi).Height * 4 + 3;
System\Windows\Forms\Controls\ToolStrips\ToolStripComboBox.ToolStripComboBoxControl.ToolStripComboBoxFlatComboAdapter.cs (1)
131brush = SystemInformation.HighContrast
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownButton.cs (1)
201if (Selected && !Pressed && SystemInformation.HighContrast)
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownMenu.cs (1)
733int menuHeight = SystemInformation.MenuHeight;
System\Windows\Forms\Controls\ToolStrips\ToolStripGrip.cs (1)
137s_dragSize = SystemInformation.DragSize;
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (1)
2117get => SystemInformation.DoubleClickTime * 10000;
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.cs (1)
69sysFont = SystemInformation.GetMenuFontForDpi(dpi);
System\Windows\Forms\Controls\ToolStrips\ToolstripProfessionalRenderer.cs (1)
814if (SystemInformation.InLockedTerminalSession())
System\Windows\Forms\Controls\ToolStrips\ToolStripRenderer.cs (1)
832if (SystemInformation.HighContrast && image is Bitmap bitmap)
System\Windows\Forms\Controls\ToolStrips\ToolStripScrollButton.cs (1)
23private static readonly int s_autoScrollPause = SystemInformation.DoubleClickTime;
System\Windows\Forms\Controls\ToolStrips\ToolStripSystemRenderer.cs (3)
579if (e.Item is ToolStripSplitButton item && !SystemInformation.HighContrast && 657if (!SystemInformation.HighContrast && 779if (!SystemInformation.InLockedTerminalSession())
System\Windows\Forms\Controls\ToolStrips\ToolStripTextBox.ToolStripTextBoxControl.cs (1)
245Color innerBorderColor = SystemInformation.HighContrast && !focused ? ColorTable.MenuBorder : BackColor;
System\Windows\Forms\Controls\TrackBar\TrackBar.cs (1)
930int wheelScrollLines = SystemInformation.MouseWheelScrollLines;
System\Windows\Forms\Controls\TreeView\TreeView.cs (2)
1624PInvokeCore.SendMessage(toolTip, PInvoke.TTM_SETMAXTIPWIDTH, 0, SystemInformation.MaxWindowTrackSize.Width); 3220PInvokeCore.SendMessage(nmhdr->hwndFrom, PInvoke.TTM_SETMAXTIPWIDTH, 0, SystemInformation.MaxWindowTrackSize.Width);
System\Windows\Forms\Controls\UpDown\UpDownBase.cs (2)
344height += SystemInformation.BorderSize.Height * 4 + 3; 739int wheelScrollLines = SystemInformation.MouseWheelScrollLines;
System\Windows\Forms\Design\ComponentEditorForm.cs (2)
251int xFrame = SystemInformation.FixedFrameBorderSize.Width; 2552 * xFrame + SystemInformation.CaptionHeight);
System\Windows\Forms\Dialogs\CommonDialogs\CommonDialog.cs (1)
170if (!SystemInformation.UserInteractive)
System\Windows\Forms\Dialogs\CommonDialogs\FileDialog.Vista.cs (1)
19&& SystemInformation.BootMode == BootMode.Normal;
System\Windows\Forms\Dialogs\CommonDialogs\FolderBrowserDialog.cs (1)
248get => AutoUpgradeEnabled && SystemInformation.BootMode == BootMode.Normal;
System\Windows\Forms\Dialogs\MessageBox.cs (1)
53if (!SystemInformation.UserInteractive && (options & (MessageBoxOptions.ServiceNotification | MessageBoxOptions.DefaultDesktopOnly)) == 0)
System\Windows\Forms\ErrorProvider\ErrorProvider.ErrorWindow.cs (1)
125(LPARAM)SystemInformation.MaxWindowTrackSize.Width);
System\Windows\Forms\Form.cs (17)
899Rectangle screen = SystemInformation.WorkingArea; 922Rectangle screen = SystemInformation.WorkingArea; 3037correctClientSize.Height += SystemInformation.HorizontalScrollBarHeight; 3042correctClientSize.Width += SystemInformation.VerticalScrollBarWidth; 3062correct.Width += SystemInformation.VerticalScrollBarWidth; 3067correct.Height += SystemInformation.HorizontalScrollBarHeight; 5227Size max = SystemInformation.MaxWindowTrackSize; 5247Size min = SystemInformation.MinWindowTrackSize; 5297x += SystemInformation.VerticalScrollBarWidth; 5305y += SystemInformation.HorizontalScrollBarHeight; 5323Rectangle workingArea = SystemInformation.WorkingArea; 5332Rectangle workingArea = SystemInformation.WorkingArea; 5392if (!SystemInformation.UserInteractive) 5591if (!SystemInformation.UserInteractive) 6356_smallIcon = new Icon(icon, SystemInformation.SmallIconSize); 6795Size virtualScreen = SystemInformation.VirtualScreen.Size; 6811Size minTrackWindowSize = SystemInformation.MinWindowTrackSize;
System\Windows\Forms\Input\Cursor.cs (1)
199s_cursorSize = SystemInformation.CursorSize;
System\Windows\Forms\Input\MouseHoverTimer.cs (1)
13_mouseHoverTimer.Interval = SystemInformation.MouseHoverTime;
System\Windows\Forms\MDI\MDIControlStrip.cs (1)
82using Icon smallIcon = new(icon, SystemInformation.SmallIconSize);
System\Windows\Forms\Printing\PrintControllerWithStatusDialog.cs (1)
40if (SystemInformation.UserInteractive)
System\Windows\Forms\Printing\PrintPreviewControl.cs (4)
37private readonly int _focusHOffset = SystemInformation.HorizontalFocusThickness; 38private readonly int _focusVOffset = SystemInformation.VerticalFocusThickness; 344bool isHighContrast = SystemInformation.HighContrast; 596if (SystemInformation.HighContrast && Parent is Control parent)
System\Windows\Forms\Rendering\ControlPaint.cs (6)
140=> SystemInformation.HighContrast ? SystemColors.WindowFrame : SystemColors.ControlDark; 1034Size sz = SystemInformation.Border3DSize; 1118: SystemInformation.HighContrast 1324? (SystemInformation.HighContrast ? SystemColors.GrayText : SystemColors.ControlDark) 1950if (SystemInformation.HighContrast) 1998if (SystemInformation.HighContrast)
System\Windows\Forms\Rendering\DisplayInformation.cs (3)
75s_highContrast = SystemInformation.HighContrast; 90s_dropShadowEnabled = SystemInformation.IsDropShadowEnabled; 106s_menuAccessKeysUnderlined = SystemInformation.MenuAccessKeysUnderlined;
System\Windows\Forms\Rendering\TextRenderer.cs (3)
550if (SystemInformation.HighContrast) 589if (!SystemInformation.IsFontSmoothingEnabled) 595return SystemInformation.FontSmoothingType == 0x0002
System\Windows\Forms\Screen.cs (9)
58if (!SystemInformation.MultiMonitorSupport || monitor == s_primaryMonitor) 61_bounds = SystemInformation.VirtualScreen; 106if (SystemInformation.MultiMonitorSupport) 158if (SystemInformation.MultiMonitorSupport) 191if (!SystemInformation.MultiMonitorSupport || _hmonitor == s_primaryMonitor) 194_workingArea = SystemInformation.WorkingArea; 250=> SystemInformation.MultiMonitorSupport 258=> SystemInformation.MultiMonitorSupport 276=> SystemInformation.MultiMonitorSupport
System\Windows\Forms\Scrolling\HScrollBar.cs (1)
24=> new(80, SystemInformation.HorizontalScrollBarHeight);
System\Windows\Forms\Scrolling\ScrollableControl.cs (7)
310fullClient.Height += SystemInformation.HorizontalScrollBarHeight; 314minClient.Height -= SystemInformation.HorizontalScrollBarHeight; 319fullClient.Width += SystemInformation.VerticalScrollBarWidth; 323minClient.Width -= SystemInformation.VerticalScrollBarWidth; 497clientToBe.Height -= SystemInformation.HorizontalScrollBarHeight; 502clientToBe.Width -= SystemInformation.VerticalScrollBarWidth; 1243SetScrollState(ScrollStateFullDrag, SystemInformation.DragFullWindows);
System\Windows\Forms\Scrolling\VScrollBar.cs (2)
33return new Size(SystemInformation.GetVerticalScrollBarWidthForDpi(_deviceDpi), LogicalToDeviceUnits(DefaultHeight)); 36return new Size(SystemInformation.VerticalScrollBarWidth, DefaultHeight);
System\Windows\Forms\ToolTip\ToolTip.cs (3)
717if (SystemInformation.HighContrast) 732PInvokeCore.SendMessage(this, PInvoke.TTM_SETMAXTIPWIDTH, 0, SystemInformation.MaxWindowTrackSize.Width); 1581Rectangle screenBounds = SystemInformation.VirtualScreen;
System.Windows.Forms.Design (47)
System\ComponentModel\Design\ByteViewer.cs (2)
438_scrollbarHeight = SystemInformation.HorizontalScrollBarHeight; 439_scrollbarWidth = SystemInformation.VerticalScrollBarWidth;
System\ComponentModel\Design\CollectionEditor.CollectionEditorCollectionForm.cs (6)
190_listBox.ItemHeight = Font.Height + SystemInformation.BorderSize.Width * 2; 218w += SystemInformation.BorderSize.Width * 4; 227return (int)Math.Ceiling(size.Width) + w + pic + SystemInformation.BorderSize.Width * 4; 570w += SystemInformation.BorderSize.Width * 4; 575button.Inflate(-SystemInformation.BorderSize.Width * 2, -SystemInformation.BorderSize.Height * 2);
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.cs (1)
103maxWidth += 2 + tm.tmMaxCharWidth + SystemInformation.VerticalScrollBarWidth;
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.FlyoutDialog.cs (2)
36int width = Math.Max(_hostedControl.Width, SystemInformation.MinimumWindowSize.Width); 37int height = Math.Max(_hostedControl.Height, SystemInformation.MinimizedWindowSize.Height);
System\ComponentModel\Design\MultilineStringEditor.MultilineStringEditorUI.cs (1)
158requestedSize.Width += SystemInformation.VerticalScrollBarWidth;
System\Windows\Forms\Design\AnchorEditor.AnchorUI.cs (2)
72int XBORDER = SystemInformation.Border3DSize.Width; 73int YBORDER = SystemInformation.Border3DSize.Height;
System\Windows\Forms\Design\ComponentTray.cs (6)
1441if (SystemInformation.HighContrast) 1458if (SystemInformation.HighContrast) 1924_borderWidth = SystemInformation.BorderSize.Width; 2189Size minDrag = SystemInformation.DragSize; 2190Size minDblClick = SystemInformation.DoubleClickSize; 2452_cyIcon = SystemInformation.IconSize.Height;
System\Windows\Forms\Design\ControlDesigner.cs (7)
1378Size minDrag = SystemInformation.DragSize; 1379Size minDblClick = SystemInformation.DoubleClickSize; 2240Size glyphSize = SystemInformation.IconSize; 2260Math.Max(SystemInformation.ToolWindowCaptionHeight - SystemInformation.BorderSize.Height - 2, Control.Font.Height), 2333int wait = SystemInformation.DoubleClickTime; 2337Size dblClick = SystemInformation.DoubleClickSize;
System\Windows\Forms\Design\DataGridViewCellStyleBuilder.cs (1)
141if (!SystemInformation.HighContrast)
System\Windows\Forms\Design\DataGridViewColumnTypeEditor.Picker.cs (1)
116Width = Math.Max(Width, PreferredWidth + (SystemInformation.VerticalScrollBarWidth * 2));
System\Windows\Forms\Design\DesignBindingPicker.cs (1)
578Width = Math.Max(Width, _treeViewCtrl is null ? 0 : _treeViewCtrl.PreferredWidth + (SystemInformation.VerticalScrollBarWidth * 2));
System\Windows\Forms\Design\DesignerUtils.cs (2)
144Size minDrag = SystemInformation.DragSize; 145Size minDblClick = SystemInformation.DoubleClickSize;
System\Windows\Forms\Design\FormDocumentDesigner.cs (4)
116size.Height += SystemInformation.HorizontalScrollBarHeight; 121size.Width += SystemInformation.VerticalScrollBarWidth; 431clientHeight += SystemInformation.HorizontalScrollBarHeight; 436clientWidth += SystemInformation.VerticalScrollBarWidth;
System\Windows\Forms\Design\MaskDesignerDialog.cs (1)
83_validatingTypeHeader.Width = (_listViewCannedMasks.Width / 3) - SystemInformation.VerticalScrollBarWidth - 4; // so no h-scrollbar.
System\Windows\Forms\Design\SelectionUIService.cs (1)
629Size minDragSize = SystemInformation.DragSize;
System\Windows\Forms\Design\ToolStripCollectionEditor.ToolStripItemEditorForm.cs (1)
995? new(4 + SystemInformation.HorizontalScrollBarThumbWidth, 3, s_iconWidth, s_iconHeight)
System\Windows\Forms\Design\ToolStripDesignerUtils.cs (3)
586s_highContrast = SystemInformation.HighContrast; 601s_dropShadowEnabled = SystemInformation.IsDropShadowEnabled; 619s_isTerminalServerSession = SystemInformation.TerminalServerSession;
System\Windows\Forms\Design\ToolStripItemBehavior.cs (1)
371Interval = SystemInformation.DoubleClickTime
System\Windows\Forms\Design\ToolStripKeyboardHandlingService.cs (1)
1249bool menusCascadeRight = SystemInformation.RightAlignedMenus;
System\Windows\Forms\Design\ToolStripTemplateNode.cs (2)
1815DrawArrow(new ToolStripArrowRenderEventArgs(g, null, bounds, SystemInformation.HighContrast ? Color.Black : SystemColors.ControlText, ArrowDirection.Down)); 2044if (item is not null && string.Equals(item.Name, CenterLabelName, StringComparison.InvariantCulture) && SystemInformation.HighContrast)
System\Windows\Forms\Design\TreeNodeCollectionEditor.cs (1)
282if (!SystemInformation.HighContrast)
System.Windows.Forms.Primitives.Tests (1)
Interop\Mocks\MockCursor.cs (1)
37public Size Size => SystemInformation.CursorSize;
System.Windows.Forms.Tests (308)
System\Windows\Forms\AccessibleObjects\Panel.PanelAccessibleObjectTests.cs (2)
280int horizontalScrollBarHeight = SystemInformation.HorizontalScrollBarHeight; 281int verticalScrollBarWidth = SystemInformation.VerticalScrollBarWidth;
System\Windows\Forms\AccessibleObjects\TabPage.TabPageAccessibleObjectTests.cs (2)
552int horizontalScrollBarHeight = SystemInformation.HorizontalScrollBarHeight; 553int verticalScrollBarWidth = SystemInformation.VerticalScrollBarWidth;
System\Windows\Forms\ApplicationTests.cs (1)
157if (SystemInformation.HighContrast)
System\Windows\Forms\ControlTests.Properties.cs (20)
10502Assert.Equal(SystemInformation.MenuAccessKeysUnderlined, control.ShowFocusCues); 10509{ (int)PInvoke.UIS_CLEAR | ((int)PInvoke.UISF_ACTIVE << 16), SystemInformation.MenuAccessKeysUnderlined }, 10510{ (int)PInvoke.UIS_CLEAR | ((int)PInvoke.UISF_HIDEACCEL << 16), SystemInformation.MenuAccessKeysUnderlined }, 10513{ (int)PInvoke.UIS_SET | ((int)PInvoke.UISF_ACTIVE << 16), SystemInformation.MenuAccessKeysUnderlined }, 10514{ (int)PInvoke.UIS_SET | ((int)PInvoke.UISF_HIDEACCEL << 16), SystemInformation.MenuAccessKeysUnderlined }, 10517{ (int)PInvoke.UIS_INITIALIZE | ((int)PInvoke.UISF_ACTIVE << 16), SystemInformation.MenuAccessKeysUnderlined }, 10518{ (int)PInvoke.UIS_INITIALIZE | ((int)PInvoke.UISF_HIDEACCEL << 16), SystemInformation.MenuAccessKeysUnderlined }, 10519{ (int)PInvoke.UIS_INITIALIZE | ((int)PInvoke.UISF_HIDEFOCUS << 16), SystemInformation.MenuAccessKeysUnderlined }, 10520{ (int)PInvoke.UIS_INITIALIZE | ((int)(PInvoke.UISF_HIDEACCEL | PInvoke.UISF_HIDEFOCUS) << 16), SystemInformation.MenuAccessKeysUnderlined } 10553Assert.Equal(SystemInformation.MenuAccessKeysUnderlined, control.ShowFocusCues); 10561Assert.Equal(SystemInformation.MenuAccessKeysUnderlined, control.ShowKeyboardCues); 10568{ (int)PInvoke.UIS_CLEAR | ((int)PInvoke.UISF_ACTIVE << 16), SystemInformation.MenuAccessKeysUnderlined }, 10570{ (int)PInvoke.UIS_CLEAR | ((int)PInvoke.UISF_HIDEFOCUS << 16), SystemInformation.MenuAccessKeysUnderlined }, 10572{ (int)PInvoke.UIS_SET | ((int)PInvoke.UISF_ACTIVE << 16), SystemInformation.MenuAccessKeysUnderlined }, 10574{ (int)PInvoke.UIS_SET | ((int)PInvoke.UISF_HIDEFOCUS << 16), SystemInformation.MenuAccessKeysUnderlined }, 10576{ (int)PInvoke.UIS_INITIALIZE | ((int)PInvoke.UISF_ACTIVE << 16), SystemInformation.MenuAccessKeysUnderlined }, 10577{ (int)PInvoke.UIS_INITIALIZE | ((int)PInvoke.UISF_HIDEACCEL << 16), SystemInformation.MenuAccessKeysUnderlined }, 10578{ (int)PInvoke.UIS_INITIALIZE | ((int)PInvoke.UISF_HIDEFOCUS << 16), SystemInformation.MenuAccessKeysUnderlined }, 10579{ (int)PInvoke.UIS_INITIALIZE | ((int)(PInvoke.UISF_HIDEACCEL | PInvoke.UISF_HIDEFOCUS) << 16), SystemInformation.MenuAccessKeysUnderlined } 10612Assert.Equal(designMode | SystemInformation.MenuAccessKeysUnderlined, control.ShowKeyboardCues);
System\Windows\Forms\CursorTests.cs (3)
209Rectangle virtualScreen = SystemInformation.VirtualScreen; 266Rectangle virtualScreen = SystemInformation.VirtualScreen; 285Rectangle virtualScreen = SystemInformation.VirtualScreen;
System\Windows\Forms\DataGridViewTextBoxEditingControlTests.cs (1)
16private static readonly int s_preferredHeight = Control.DefaultFont.Height + SystemInformation.BorderSize.Height * 4 + 3;
System\Windows\Forms\Design\ComponentEditorFormTests.cs (4)
78Assert.Equal(new Rectangle(-SystemInformation.WorkingArea.X, -SystemInformation.WorkingArea.Y, control.Width, control.Height), control.DesktopBounds); 79Assert.Equal(new Point(-SystemInformation.WorkingArea.X, -SystemInformation.WorkingArea.Y), control.DesktopLocation);
System\Windows\Forms\FormTests.cs (4)
77Assert.Equal(new Rectangle(-SystemInformation.WorkingArea.X, -SystemInformation.WorkingArea.Y, 300, 300), control.DesktopBounds); 78Assert.Equal(new Point(-SystemInformation.WorkingArea.X, -SystemInformation.WorkingArea.Y), control.DesktopLocation);
System\Windows\Forms\ListBoxTests.cs (3)
102Assert.Equal(Control.DefaultFont.Height + SystemInformation.BorderSize.Height * 4 + 3, control.PreferredHeight); 2052int extra = SystemInformation.BorderSize.Height * 4 + 3; 2081int extra = SystemInformation.BorderSize.Height * 4 + 3;
System\Windows\Forms\PowerStatusTests.cs (5)
14PowerStatus status = SystemInformation.PowerStatus; 46PowerStatus status = SystemInformation.PowerStatus; 53PowerStatus status = SystemInformation.PowerStatus; 61PowerStatus status = SystemInformation.PowerStatus; 68PowerStatus status = SystemInformation.PowerStatus;
System\Windows\Forms\PropertyGridInternal\PropertyGridView.DropDownHolderTests.cs (1)
100int resizeBarSize = SystemInformation.HorizontalScrollBarHeight + 1;
System\Windows\Forms\RichTextBoxTests.cs (1)
24private static readonly int s_preferredHeight = Control.DefaultFont.Height + SystemInformation.BorderSize.Height * 4 + 3;
System\Windows\Forms\ScrollableControlTests.cs (4)
201yield return new object[] { true, width, height, width - 20, height + 50, new Rectangle(0, 0, width - SystemInformation.VerticalScrollBarWidth, height) }; 202yield return new object[] { true, width, height, width + 50, height - 20, new Rectangle(0, 0, width, height - SystemInformation.HorizontalScrollBarHeight) }; 203yield return new object[] { true, width, height, width + 50, height + 50, new Rectangle(0, 0, width - SystemInformation.VerticalScrollBarWidth, height - SystemInformation.HorizontalScrollBarHeight) };
System\Windows\Forms\SystemInformationTests.cs (217)
18int delay = SystemInformation.ActiveWindowTrackingDelay; 20Assert.Equal(delay, SystemInformation.ActiveWindowTrackingDelay); 26ArrangeDirection direction = SystemInformation.ArrangeDirection; 28Assert.Equal(direction, SystemInformation.ArrangeDirection); 34ArrangeStartingPosition position = SystemInformation.ArrangeStartingPosition; 36Assert.Equal(position, SystemInformation.ArrangeStartingPosition); 42BootMode bootMode = SystemInformation.BootMode; 44Assert.Equal(bootMode, SystemInformation.BootMode); 50Size size = SystemInformation.Border3DSize; 53Assert.Equal(size, SystemInformation.Border3DSize); 59int factor = SystemInformation.BorderMultiplierFactor; 61Assert.Equal(factor, SystemInformation.BorderMultiplierFactor); 67Size size = SystemInformation.BorderSize; 70Assert.Equal(size, SystemInformation.BorderSize); 76Size size = SystemInformation.CaptionButtonSize; 79Assert.Equal(size, SystemInformation.CaptionButtonSize); 85int height = SystemInformation.CaptionHeight; 87Assert.Equal(height, SystemInformation.CaptionHeight); 93int blinkTime = SystemInformation.CaretBlinkTime; 95Assert.Equal(blinkTime, SystemInformation.CaretBlinkTime); 101int height = SystemInformation.CaretWidth; 103Assert.Equal(height, SystemInformation.CaretWidth); 109string name = SystemInformation.ComputerName; 112Assert.Equal(name, SystemInformation.ComputerName); 118Size size = SystemInformation.CursorSize; 120Assert.Equal(size, SystemInformation.CursorSize); 126Assert.Equal(SystemInformation.DbcsEnabled, SystemInformation.DbcsEnabled); 132Assert.Equal(SystemInformation.DbcsEnabled, SystemInformation.DebugOS); 138Size size = SystemInformation.DoubleClickSize; 141Assert.Equal(size, SystemInformation.DoubleClickSize); 147int time = SystemInformation.DoubleClickTime; 149Assert.Equal(time, SystemInformation.DoubleClickTime); 155Assert.Equal(SystemInformation.DragFullWindows, SystemInformation.DragFullWindows); 161Size size = SystemInformation.DragSize; 164Assert.Equal(size, SystemInformation.DragSize); 170Size size = SystemInformation.FixedFrameBorderSize; 173Assert.Equal(size, SystemInformation.FixedFrameBorderSize); 179int contrast = SystemInformation.FontSmoothingContrast; 181Assert.Equal(contrast, SystemInformation.FontSmoothingContrast); 187int contrast = SystemInformation.FontSmoothingType; 189Assert.Equal(contrast, SystemInformation.FontSmoothingType); 195Size size = SystemInformation.FrameBorderSize; 198Assert.Equal(size, SystemInformation.FrameBorderSize); 204Assert.Equal(SystemInformation.HighContrast, SystemInformation.HighContrast); 210int thickness = SystemInformation.HorizontalFocusThickness; 212Assert.Equal(thickness, SystemInformation.HorizontalFocusThickness); 218int thickness = SystemInformation.HorizontalResizeBorderThickness; 220Assert.Equal(thickness, SystemInformation.HorizontalResizeBorderThickness); 226int width = SystemInformation.HorizontalScrollBarArrowWidth; 228Assert.Equal(width, SystemInformation.GetHorizontalScrollBarArrowWidthForDpi(LogicalDpi)); 229Assert.Equal(width, SystemInformation.HorizontalScrollBarArrowWidth); 235int height = SystemInformation.HorizontalScrollBarHeight; 237Assert.Equal(height, SystemInformation.HorizontalScrollBarHeight); 243int width = SystemInformation.HorizontalScrollBarThumbWidth; 245Assert.Equal(width, SystemInformation.HorizontalScrollBarThumbWidth); 251int spacing = SystemInformation.IconHorizontalSpacing; 253Assert.Equal(spacing, SystemInformation.IconHorizontalSpacing); 259Size size = SystemInformation.IconSize; 262Assert.Equal(size, SystemInformation.IconSize); 268Size size = SystemInformation.IconSpacingSize; 271Assert.Equal(size, SystemInformation.IconSpacingSize); 277int spacing = SystemInformation.IconVerticalSpacing; 279Assert.Equal(spacing, SystemInformation.IconVerticalSpacing); 285Assert.Equal(SystemInformation.IsActiveWindowTrackingEnabled, SystemInformation.IsActiveWindowTrackingEnabled); 291Assert.Equal(SystemInformation.IsComboBoxAnimationEnabled, SystemInformation.IsComboBoxAnimationEnabled); 297Assert.Equal(SystemInformation.IsDropShadowEnabled, SystemInformation.IsDropShadowEnabled); 303Assert.Equal(SystemInformation.IsFlatMenuEnabled, SystemInformation.IsFlatMenuEnabled); 309Assert.Equal(SystemInformation.IsFontSmoothingEnabled, SystemInformation.IsFontSmoothingEnabled); 315Assert.Equal(SystemInformation.IsHotTrackingEnabled, SystemInformation.IsHotTrackingEnabled); 321Assert.Equal(SystemInformation.IsIconTitleWrappingEnabled, SystemInformation.IsIconTitleWrappingEnabled); 327Assert.Equal(SystemInformation.IsKeyboardPreferred, SystemInformation.IsKeyboardPreferred); 333Assert.Equal(SystemInformation.IsListBoxSmoothScrollingEnabled, SystemInformation.IsListBoxSmoothScrollingEnabled); 339Assert.Equal(SystemInformation.IsMenuAnimationEnabled, SystemInformation.IsMenuAnimationEnabled); 345Assert.Equal(SystemInformation.IsMenuFadeEnabled, SystemInformation.IsMenuFadeEnabled); 351Assert.Equal(SystemInformation.IsMinimizeRestoreAnimationEnabled, SystemInformation.IsMinimizeRestoreAnimationEnabled); 357Assert.Equal(SystemInformation.IsSelectionFadeEnabled, SystemInformation.IsSelectionFadeEnabled); 363Assert.Equal(SystemInformation.IsSnapToDefaultEnabled, SystemInformation.IsSnapToDefaultEnabled); 369Assert.Equal(SystemInformation.IsTitleBarGradientEnabled, SystemInformation.IsTitleBarGradientEnabled); 375Assert.Equal(SystemInformation.IsToolTipAnimationEnabled, SystemInformation.IsToolTipAnimationEnabled); 381int height = SystemInformation.KanjiWindowHeight; 383Assert.Equal(height, SystemInformation.KanjiWindowHeight); 389int delay = SystemInformation.KeyboardDelay; 391Assert.Equal(delay, SystemInformation.KeyboardDelay); 397int speed = SystemInformation.KeyboardSpeed; 399Assert.Equal(speed, SystemInformation.KeyboardSpeed); 405Size size = SystemInformation.MaxWindowTrackSize; 408Assert.Equal(size, SystemInformation.MaxWindowTrackSize); 414Assert.Equal(SystemInformation.MenuAccessKeysUnderlined, SystemInformation.MenuAccessKeysUnderlined); 420Size size = SystemInformation.MenuBarButtonSize; 423Assert.Equal(size, SystemInformation.MenuBarButtonSize); 429Size size = SystemInformation.MenuButtonSize; 432Assert.Equal(size, SystemInformation.MenuButtonSize); 438Size size = SystemInformation.MenuCheckSize; 441Assert.Equal(size, SystemInformation.MenuCheckSize); 447Font font = SystemInformation.MenuFont; 449Assert.Equal(font, SystemInformation.MenuFont); 455int height = SystemInformation.MenuHeight; 457Assert.Equal(height, SystemInformation.MenuHeight); 463int delay = SystemInformation.MenuShowDelay; 465Assert.Equal(delay, SystemInformation.MenuShowDelay); 471Assert.Equal(SystemInformation.MidEastEnabled, SystemInformation.MidEastEnabled); 477Size size = SystemInformation.MinimizedWindowSize; 480Assert.Equal(size, SystemInformation.MinimizedWindowSize); 486Size size = SystemInformation.MinimizedWindowSize; 489Assert.Equal(size, SystemInformation.MinimizedWindowSpacingSize); 495Size size = SystemInformation.MinimumWindowSize; 498Assert.Equal(size, SystemInformation.MinimumWindowSize); 504Size size = SystemInformation.MinWindowTrackSize; 507Assert.Equal(size, SystemInformation.MinWindowTrackSize); 513int count = SystemInformation.MonitorCount; 516Assert.Equal(count, SystemInformation.MonitorCount); 522Assert.Equal(SystemInformation.MonitorsSameDisplayFormat, SystemInformation.MonitorsSameDisplayFormat); 528int count = SystemInformation.MouseButtons; 530Assert.Equal(count, SystemInformation.MouseButtons); 536Assert.Equal(SystemInformation.MouseButtonsSwapped, SystemInformation.MouseButtonsSwapped); 542Size size = SystemInformation.MouseHoverSize; 545Assert.Equal(size, SystemInformation.MouseHoverSize); 551int count = SystemInformation.MouseHoverTime; 553Assert.Equal(count, SystemInformation.MouseHoverTime); 559Assert.Equal(SystemInformation.MousePresent, SystemInformation.MousePresent); 565int count = SystemInformation.MouseSpeed; 567Assert.Equal(count, SystemInformation.MouseSpeed); 573Assert.Equal(SystemInformation.MouseWheelPresent, SystemInformation.MouseWheelPresent); 579int delta = SystemInformation.MouseWheelScrollDelta; 581Assert.Equal(delta, SystemInformation.MouseWheelScrollDelta); 587int lines = SystemInformation.MouseWheelScrollLines; 589Assert.Equal(lines, SystemInformation.MouseWheelScrollLines); 595Assert.Equal(SystemInformation.NativeMouseWheelSupport, SystemInformation.NativeMouseWheelSupport); 601Assert.Equal(SystemInformation.Network, SystemInformation.Network); 607Assert.Equal(SystemInformation.PenWindows, SystemInformation.PenWindows); 613LeftRightAlignment alignment = SystemInformation.PopupMenuAlignment; 615Assert.Equal(alignment, SystemInformation.PopupMenuAlignment); 621PowerStatus status = SystemInformation.PowerStatus; 623Assert.Same(status, SystemInformation.PowerStatus); 629Size size = SystemInformation.PrimaryMonitorMaximizedWindowSize; 632Assert.Equal(size, SystemInformation.PrimaryMonitorMaximizedWindowSize); 638Size size = SystemInformation.PrimaryMonitorSize; 641Assert.Equal(size, SystemInformation.PrimaryMonitorSize); 647Assert.Equal(SystemInformation.RightAlignedMenus, SystemInformation.RightAlignedMenus); 653ScreenOrientation orientation = SystemInformation.ScreenOrientation; 655Assert.Equal(orientation, SystemInformation.ScreenOrientation); 661Assert.Equal(SystemInformation.Secure, SystemInformation.Secure); 667Assert.Equal(SystemInformation.ShowSounds, SystemInformation.ShowSounds); 673int width = SystemInformation.SizingBorderWidth; 675Assert.Equal(width, SystemInformation.SizingBorderWidth); 681Size size = SystemInformation.SmallCaptionButtonSize; 684Assert.Equal(size, SystemInformation.SmallCaptionButtonSize); 690Size size = SystemInformation.SmallIconSize; 693Assert.Equal(size, SystemInformation.SmallIconSize); 699Assert.Equal(SystemInformation.TerminalServerSession, SystemInformation.TerminalServerSession); 705Size size = SystemInformation.ToolWindowCaptionButtonSize; 708Assert.Equal(size, SystemInformation.ToolWindowCaptionButtonSize); 714int height = SystemInformation.ToolWindowCaptionHeight; 716Assert.Equal(height, SystemInformation.ToolWindowCaptionHeight); 722Assert.Equal(SystemInformation.UIEffectsEnabled, SystemInformation.UIEffectsEnabled); 728string domainName = SystemInformation.UserDomainName; 730Assert.Equal(domainName, SystemInformation.UserDomainName); 736Assert.Equal(SystemInformation.UserInteractive, SystemInformation.UserInteractive); 742string name = SystemInformation.UserName; 745Assert.Equal(name, SystemInformation.UserName); 751int thickness = SystemInformation.VerticalFocusThickness; 753Assert.Equal(thickness, SystemInformation.VerticalFocusThickness); 759int thickness = SystemInformation.VerticalResizeBorderThickness; 761Assert.Equal(thickness, SystemInformation.VerticalResizeBorderThickness); 767int height = SystemInformation.VerticalScrollBarArrowHeight; 769Assert.Equal(height, SystemInformation.VerticalScrollBarArrowHeightForDpi(LogicalDpi)); 770Assert.Equal(height, SystemInformation.VerticalScrollBarArrowHeight); 776int height = SystemInformation.VerticalScrollBarThumbHeight; 778Assert.Equal(height, SystemInformation.VerticalScrollBarThumbHeight); 784int width = SystemInformation.VerticalScrollBarWidth; 786Assert.Equal(width, SystemInformation.GetVerticalScrollBarWidthForDpi(LogicalDpi)); 787Assert.Equal(width, SystemInformation.VerticalScrollBarWidth); 793Rectangle screen = SystemInformation.VirtualScreen; 796Assert.Equal(screen, SystemInformation.VirtualScreen); 802Rectangle workingArea = SystemInformation.WorkingArea; 807Assert.Equal(workingArea, SystemInformation.WorkingArea); 822Size size = SystemInformation.GetBorderSizeForDpi(dpi); 831int width = SystemInformation.GetHorizontalScrollBarArrowWidthForDpi(dpi); 839int height = SystemInformation.GetHorizontalScrollBarHeightForDpi(dpi); 847Font font = SystemInformation.GetMenuFontForDpi(dpi); 855int width = SystemInformation.GetVerticalScrollBarWidthForDpi(dpi); 863int height = SystemInformation.VerticalScrollBarArrowHeightForDpi(dpi);
System\Windows\Forms\ToolStripButtonTests.cs (6)
83Assert.Equal(SystemInformation.MenuAccessKeysUnderlined, item.ShowKeyboardCues); 164Assert.Equal(SystemInformation.MenuAccessKeysUnderlined, item.ShowKeyboardCues); 251Assert.Equal(SystemInformation.MenuAccessKeysUnderlined, item.ShowKeyboardCues); 341Assert.Equal(SystemInformation.MenuAccessKeysUnderlined, item.ShowKeyboardCues); 429Assert.Equal(SystemInformation.MenuAccessKeysUnderlined, item.ShowKeyboardCues); 527Assert.Equal(SystemInformation.MenuAccessKeysUnderlined, item.ShowKeyboardCues);
System\Windows\Forms\ToolStripControlHostTests.cs (1)
112Assert.Equal(SystemInformation.MenuAccessKeysUnderlined, item.ShowKeyboardCues);
System\Windows\Forms\ToolStripDropDownItemTests.cs (4)
83Assert.Equal(SystemInformation.MenuAccessKeysUnderlined, item.ShowKeyboardCues); 172Assert.Equal(SystemInformation.MenuAccessKeysUnderlined, item.ShowKeyboardCues); 271Assert.Equal(SystemInformation.MenuAccessKeysUnderlined, item.ShowKeyboardCues); 379Assert.Equal(SystemInformation.MenuAccessKeysUnderlined, item.ShowKeyboardCues);
System\Windows\Forms\ToolStripDropDownTests.cs (12)
81Assert.Equal(SystemInformation.IsDropShadowEnabled, control.DropShadowEnabled); 138Assert.Equal(SystemInformation.WorkingArea.X + 2, control.Right); 171Assert.Equal(SystemInformation.IsDropShadowEnabled ? 0x20808 : 0x808, createParams.ClassStyle); 186yield return new object[] { true, SystemInformation.IsDropShadowEnabled ? 0x20808 : 0x808 }; 217yield return new object[] { true, 1.0, SystemInformation.IsDropShadowEnabled ? 0x20808 : 0x808, -0x7E000000, 0x10000 }; 218yield return new object[] { true, 0.5, SystemInformation.IsDropShadowEnabled ? 0x20008 : 0x8, -0x7E000000, 0x90000 }; 219yield return new object[] { false, 1.0, SystemInformation.IsDropShadowEnabled ? 0x20008 : 0x8, 0x46000000, 0x10000 }; 220yield return new object[] { false, 0.5, SystemInformation.IsDropShadowEnabled ? 0x20008 : 0x8, 0x46000000, 0x10000 }; 1933expected.X = Math.Max(expected.X, SystemInformation.WorkingArea.X); 1934expected.Y = Math.Max(expected.Y, SystemInformation.WorkingArea.Y); 1936if (expectedLocationChangedCallCount == 0 && SystemInformation.WorkingArea.Location != Point.Empty) 5007var nonClientSize = SystemInformation.BorderSize;
System\Windows\Forms\ToolStripItemTests.cs (3)
82Assert.Equal(SystemInformation.MenuAccessKeysUnderlined, item.ShowKeyboardCues); 167Assert.Equal(SystemInformation.MenuAccessKeysUnderlined, item.ShowKeyboardCues); 262Assert.Equal(SystemInformation.MenuAccessKeysUnderlined, item.ShowKeyboardCues);
System\Windows\Forms\ToolStripMenuItemTests.cs (1)
86Assert.Equal(SystemInformation.MenuAccessKeysUnderlined, item.ShowKeyboardCues);
System\Windows\Forms\ToolStripSeparatorTests.cs (1)
80Assert.Equal(SystemInformation.MenuAccessKeysUnderlined, item.ShowKeyboardCues);
System\Windows\Forms\ToolStripTests.cs (1)
7317await Assert.ThrowsAsync<TaskCanceledException>(() => Task.Delay(SystemInformation.MouseHoverTime * 2, cancellationTokenSource.Token));
System\Windows\Forms\UpDownBaseTests.cs (8)
721yield return new object[] { BorderStyle.Fixed3D, new Size(122, Control.DefaultFont.Height + SystemInformation.BorderSize.Height * 4 + 3) }; 722yield return new object[] { BorderStyle.FixedSingle, new Size(122, Control.DefaultFont.Height + SystemInformation.BorderSize.Height * 4 + 3) }; 727yield return new object[] { BorderStyle.Fixed3D, new Size(123, Control.DefaultFont.Height + SystemInformation.BorderSize.Height * 4 + 3) }; 728yield return new object[] { BorderStyle.FixedSingle, new Size(121, Control.DefaultFont.Height + SystemInformation.BorderSize.Height * 4 + 3) }; 758yield return new object[] { BorderStyle.Fixed3D, 0, 0, new Size(122, Control.DefaultFont.Height + SystemInformation.BorderSize.Height * 4 + 3) }; 759yield return new object[] { BorderStyle.FixedSingle, 0, 1, new Size(122, Control.DefaultFont.Height + SystemInformation.BorderSize.Height * 4 + 3) }; 764yield return new object[] { BorderStyle.Fixed3D, 0, 0, new Size(123, Control.DefaultFont.Height + SystemInformation.BorderSize.Height * 4 + 3) }; 765yield return new object[] { BorderStyle.FixedSingle, 1, 1, new Size(123, Control.DefaultFont.Height + SystemInformation.BorderSize.Height * 4 + 3) };
TextBoxBaseTests.cs (1)
18private static readonly int s_preferredHeight = Control.DefaultFont.Height + SystemInformation.BorderSize.Height * 4 + 3;
TextBoxTests.cs (1)
15private static readonly int s_preferredHeight = Control.DefaultFont.Height + SystemInformation.BorderSize.Height * 4 + 3;
TrackBarTests.cs (1)
16public static readonly int s_dimension = (SystemInformation.HorizontalScrollBarHeight * 8) / 3;
System.Windows.Forms.UI.IntegrationTests (7)
ButtonTests.cs (2)
260Size primaryMonitor = SystemInformation.PrimaryMonitorSize; 296Size primaryMonitor = SystemInformation.PrimaryMonitorSize;
DragDropTests.cs (3)
196Rectangle vscreen = SystemInformation.VirtualScreen; 716Size dragSize = SystemInformation.DragSize; 765_screenOffset = SystemInformation.WorkingArea.Location;
Infra\ControlTestBase.cs (2)
183Size primaryMonitor = SystemInformation.PrimaryMonitorSize; 192Size primaryMonitor = SystemInformation.PrimaryMonitorSize;