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)
3270if (SystemInformation.MenuAccessKeysUnderlined) 3316if (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)
34int 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)
941&& SystemInformation.VerticalScrollBarWidth <= _layout.Data.Width) 944availableWidth -= SystemInformation.VerticalScrollBarWidth; 4545int oldThumbHeight = Math.Max(((_vertScrollBar.Height - 2 * SystemInformation.VerticalScrollBarArrowHeight) * _vertScrollBar.LargeChange) / _vertScrollBar.Maximum, 8); 4556(_vertScrollBar.Height - 2 * SystemInformation.VerticalScrollBarArrowHeight) * _vertScrollBar.LargeChange / _vertScrollBar.Maximum, 5782&& (DateTime.Now.Ticks - _lastMouseClickInfo.TimeStamp) / 10000 <= SystemInformation.DoubleClickTime 5788Size hotDoubleClickZone = SystemInformation.DoubleClickSize; 10171int horizScrollBarHeight = _horizScrollBar.Height = SystemInformation.HorizontalScrollBarHeight; 10172int vertScrollBarWidth = _vertScrollBar.Width = SystemInformation.VerticalScrollBarWidth; 16482int wheelScrollLines = SystemInformation.MouseWheelScrollLines; 16716if (SystemInformation.HighContrast) 30053PInvokeCore.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, 1194checkBoxSize = 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)
1035if (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)
2086PInvokeCore.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)
70sysFont = SystemInformation.GetMenuFontForDpi(dpi);
System\Windows\Forms\Controls\ToolStrips\ToolstripProfessionalRenderer.cs (1)
814if (SystemInformation.InLockedTerminalSession())
System\Windows\Forms\Controls\ToolStrips\ToolStripRenderer.cs (1)
833if (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)
581if (e.Item is ToolStripSplitButton item && !SystemInformation.HighContrast && 658if (!SystemInformation.HighContrast && 780if (!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)
931int 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)
169if (!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)
54if (!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; 1037Size sz = SystemInformation.Border3DSize; 1121: SystemInformation.HighContrast 1327? (SystemInformation.HighContrast ? SystemColors.GrayText : SystemColors.ControlDark) 1954if (SystemInformation.HighContrast) 2002if (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)
316fullClient.Height += SystemInformation.HorizontalScrollBarHeight; 320minClient.Height -= SystemInformation.HorizontalScrollBarHeight; 325fullClient.Width += SystemInformation.VerticalScrollBarWidth; 329minClient.Width -= SystemInformation.VerticalScrollBarWidth; 503clientToBe.Height -= SystemInformation.HorizontalScrollBarHeight; 508clientToBe.Width -= SystemInformation.VerticalScrollBarWidth; 1249SetScrollState(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\SelectionUIHandler.cs (1)
75Rectangle screen = SystemInformation.VirtualScreen;
System\Windows\Forms\Design\SelectionUIService.cs (1)
629Size minDragSize = SystemInformation.DragSize;
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)
39public Size Size => SystemInformation.CursorSize;
System.Windows.Forms.Tests (308)
System\Windows\Forms\AccessibleObjects\Panel.PanelAccessibleObjectTests.cs (2)
278int horizontalScrollBarHeight = SystemInformation.HorizontalScrollBarHeight; 279int verticalScrollBarWidth = SystemInformation.VerticalScrollBarWidth;
System\Windows\Forms\AccessibleObjects\TabPage.TabPageAccessibleObjectTests.cs (2)
550int horizontalScrollBarHeight = SystemInformation.HorizontalScrollBarHeight; 551int verticalScrollBarWidth = SystemInformation.VerticalScrollBarWidth;
System\Windows\Forms\ApplicationTests.cs (1)
155if (SystemInformation.HighContrast)
System\Windows\Forms\ControlTests.Properties.cs (20)
10500Assert.Equal(SystemInformation.MenuAccessKeysUnderlined, control.ShowFocusCues); 10507{ (int)PInvoke.UIS_CLEAR | ((int)PInvoke.UISF_ACTIVE << 16), SystemInformation.MenuAccessKeysUnderlined }, 10508{ (int)PInvoke.UIS_CLEAR | ((int)PInvoke.UISF_HIDEACCEL << 16), SystemInformation.MenuAccessKeysUnderlined }, 10511{ (int)PInvoke.UIS_SET | ((int)PInvoke.UISF_ACTIVE << 16), SystemInformation.MenuAccessKeysUnderlined }, 10512{ (int)PInvoke.UIS_SET | ((int)PInvoke.UISF_HIDEACCEL << 16), SystemInformation.MenuAccessKeysUnderlined }, 10515{ (int)PInvoke.UIS_INITIALIZE | ((int)PInvoke.UISF_ACTIVE << 16), SystemInformation.MenuAccessKeysUnderlined }, 10516{ (int)PInvoke.UIS_INITIALIZE | ((int)PInvoke.UISF_HIDEACCEL << 16), SystemInformation.MenuAccessKeysUnderlined }, 10517{ (int)PInvoke.UIS_INITIALIZE | ((int)PInvoke.UISF_HIDEFOCUS << 16), SystemInformation.MenuAccessKeysUnderlined }, 10518{ (int)PInvoke.UIS_INITIALIZE | ((int)(PInvoke.UISF_HIDEACCEL | PInvoke.UISF_HIDEFOCUS) << 16), SystemInformation.MenuAccessKeysUnderlined } 10551Assert.Equal(SystemInformation.MenuAccessKeysUnderlined, control.ShowFocusCues); 10559Assert.Equal(SystemInformation.MenuAccessKeysUnderlined, control.ShowKeyboardCues); 10566{ (int)PInvoke.UIS_CLEAR | ((int)PInvoke.UISF_ACTIVE << 16), SystemInformation.MenuAccessKeysUnderlined }, 10568{ (int)PInvoke.UIS_CLEAR | ((int)PInvoke.UISF_HIDEFOCUS << 16), SystemInformation.MenuAccessKeysUnderlined }, 10570{ (int)PInvoke.UIS_SET | ((int)PInvoke.UISF_ACTIVE << 16), SystemInformation.MenuAccessKeysUnderlined }, 10572{ (int)PInvoke.UIS_SET | ((int)PInvoke.UISF_HIDEFOCUS << 16), SystemInformation.MenuAccessKeysUnderlined }, 10574{ (int)PInvoke.UIS_INITIALIZE | ((int)PInvoke.UISF_ACTIVE << 16), SystemInformation.MenuAccessKeysUnderlined }, 10575{ (int)PInvoke.UIS_INITIALIZE | ((int)PInvoke.UISF_HIDEACCEL << 16), SystemInformation.MenuAccessKeysUnderlined }, 10576{ (int)PInvoke.UIS_INITIALIZE | ((int)PInvoke.UISF_HIDEFOCUS << 16), SystemInformation.MenuAccessKeysUnderlined }, 10577{ (int)PInvoke.UIS_INITIALIZE | ((int)(PInvoke.UISF_HIDEACCEL | PInvoke.UISF_HIDEFOCUS) << 16), SystemInformation.MenuAccessKeysUnderlined } 10610Assert.Equal(designMode | SystemInformation.MenuAccessKeysUnderlined, control.ShowKeyboardCues);
System\Windows\Forms\CursorTests.cs (3)
207Rectangle virtualScreen = SystemInformation.VirtualScreen; 264Rectangle virtualScreen = SystemInformation.VirtualScreen; 283Rectangle virtualScreen = SystemInformation.VirtualScreen;
System\Windows\Forms\DataGridViewTextBoxEditingControlTests.cs (1)
14private static readonly int s_preferredHeight = Control.DefaultFont.Height + SystemInformation.BorderSize.Height * 4 + 3;
System\Windows\Forms\Design\ComponentEditorFormTests.cs (4)
76Assert.Equal(new Rectangle(-SystemInformation.WorkingArea.X, -SystemInformation.WorkingArea.Y, control.Width, control.Height), control.DesktopBounds); 77Assert.Equal(new Point(-SystemInformation.WorkingArea.X, -SystemInformation.WorkingArea.Y), control.DesktopLocation);
System\Windows\Forms\FormTests.cs (4)
75Assert.Equal(new Rectangle(-SystemInformation.WorkingArea.X, -SystemInformation.WorkingArea.Y, 300, 300), control.DesktopBounds); 76Assert.Equal(new Point(-SystemInformation.WorkingArea.X, -SystemInformation.WorkingArea.Y), control.DesktopLocation);
System\Windows\Forms\ListBoxTests.cs (3)
100Assert.Equal(Control.DefaultFont.Height + SystemInformation.BorderSize.Height * 4 + 3, control.PreferredHeight); 2050int extra = SystemInformation.BorderSize.Height * 4 + 3; 2079int extra = SystemInformation.BorderSize.Height * 4 + 3;
System\Windows\Forms\PowerStatusTests.cs (5)
12PowerStatus status = SystemInformation.PowerStatus; 44PowerStatus status = SystemInformation.PowerStatus; 51PowerStatus status = SystemInformation.PowerStatus; 59PowerStatus status = SystemInformation.PowerStatus; 66PowerStatus status = SystemInformation.PowerStatus;
System\Windows\Forms\PropertyGridInternal\PropertyGridView.DropDownHolderTests.cs (1)
98int resizeBarSize = SystemInformation.HorizontalScrollBarHeight + 1;
System\Windows\Forms\RichTextBoxTests.cs (1)
22private static readonly int s_preferredHeight = Control.DefaultFont.Height + SystemInformation.BorderSize.Height * 4 + 3;
System\Windows\Forms\ScrollableControlTests.cs (4)
199yield return new object[] { true, width, height, width - 20, height + 50, new Rectangle(0, 0, width - SystemInformation.VerticalScrollBarWidth, height) }; 200yield return new object[] { true, width, height, width + 50, height - 20, new Rectangle(0, 0, width, height - SystemInformation.HorizontalScrollBarHeight) }; 201yield 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)
16int delay = SystemInformation.ActiveWindowTrackingDelay; 18Assert.Equal(delay, SystemInformation.ActiveWindowTrackingDelay); 24ArrangeDirection direction = SystemInformation.ArrangeDirection; 26Assert.Equal(direction, SystemInformation.ArrangeDirection); 32ArrangeStartingPosition position = SystemInformation.ArrangeStartingPosition; 34Assert.Equal(position, SystemInformation.ArrangeStartingPosition); 40BootMode bootMode = SystemInformation.BootMode; 42Assert.Equal(bootMode, SystemInformation.BootMode); 48Size size = SystemInformation.Border3DSize; 51Assert.Equal(size, SystemInformation.Border3DSize); 57int factor = SystemInformation.BorderMultiplierFactor; 59Assert.Equal(factor, SystemInformation.BorderMultiplierFactor); 65Size size = SystemInformation.BorderSize; 68Assert.Equal(size, SystemInformation.BorderSize); 74Size size = SystemInformation.CaptionButtonSize; 77Assert.Equal(size, SystemInformation.CaptionButtonSize); 83int height = SystemInformation.CaptionHeight; 85Assert.Equal(height, SystemInformation.CaptionHeight); 91int blinkTime = SystemInformation.CaretBlinkTime; 93Assert.Equal(blinkTime, SystemInformation.CaretBlinkTime); 99int height = SystemInformation.CaretWidth; 101Assert.Equal(height, SystemInformation.CaretWidth); 107string name = SystemInformation.ComputerName; 110Assert.Equal(name, SystemInformation.ComputerName); 116Size size = SystemInformation.CursorSize; 118Assert.Equal(size, SystemInformation.CursorSize); 124Assert.Equal(SystemInformation.DbcsEnabled, SystemInformation.DbcsEnabled); 130Assert.Equal(SystemInformation.DbcsEnabled, SystemInformation.DebugOS); 136Size size = SystemInformation.DoubleClickSize; 139Assert.Equal(size, SystemInformation.DoubleClickSize); 145int time = SystemInformation.DoubleClickTime; 147Assert.Equal(time, SystemInformation.DoubleClickTime); 153Assert.Equal(SystemInformation.DragFullWindows, SystemInformation.DragFullWindows); 159Size size = SystemInformation.DragSize; 162Assert.Equal(size, SystemInformation.DragSize); 168Size size = SystemInformation.FixedFrameBorderSize; 171Assert.Equal(size, SystemInformation.FixedFrameBorderSize); 177int contrast = SystemInformation.FontSmoothingContrast; 179Assert.Equal(contrast, SystemInformation.FontSmoothingContrast); 185int contrast = SystemInformation.FontSmoothingType; 187Assert.Equal(contrast, SystemInformation.FontSmoothingType); 193Size size = SystemInformation.FrameBorderSize; 196Assert.Equal(size, SystemInformation.FrameBorderSize); 202Assert.Equal(SystemInformation.HighContrast, SystemInformation.HighContrast); 208int thickness = SystemInformation.HorizontalFocusThickness; 210Assert.Equal(thickness, SystemInformation.HorizontalFocusThickness); 216int thickness = SystemInformation.HorizontalResizeBorderThickness; 218Assert.Equal(thickness, SystemInformation.HorizontalResizeBorderThickness); 224int width = SystemInformation.HorizontalScrollBarArrowWidth; 226Assert.Equal(width, SystemInformation.GetHorizontalScrollBarArrowWidthForDpi(LogicalDpi)); 227Assert.Equal(width, SystemInformation.HorizontalScrollBarArrowWidth); 233int height = SystemInformation.HorizontalScrollBarHeight; 235Assert.Equal(height, SystemInformation.HorizontalScrollBarHeight); 241int width = SystemInformation.HorizontalScrollBarThumbWidth; 243Assert.Equal(width, SystemInformation.HorizontalScrollBarThumbWidth); 249int spacing = SystemInformation.IconHorizontalSpacing; 251Assert.Equal(spacing, SystemInformation.IconHorizontalSpacing); 257Size size = SystemInformation.IconSize; 260Assert.Equal(size, SystemInformation.IconSize); 266Size size = SystemInformation.IconSpacingSize; 269Assert.Equal(size, SystemInformation.IconSpacingSize); 275int spacing = SystemInformation.IconVerticalSpacing; 277Assert.Equal(spacing, SystemInformation.IconVerticalSpacing); 283Assert.Equal(SystemInformation.IsActiveWindowTrackingEnabled, SystemInformation.IsActiveWindowTrackingEnabled); 289Assert.Equal(SystemInformation.IsComboBoxAnimationEnabled, SystemInformation.IsComboBoxAnimationEnabled); 295Assert.Equal(SystemInformation.IsDropShadowEnabled, SystemInformation.IsDropShadowEnabled); 301Assert.Equal(SystemInformation.IsFlatMenuEnabled, SystemInformation.IsFlatMenuEnabled); 307Assert.Equal(SystemInformation.IsFontSmoothingEnabled, SystemInformation.IsFontSmoothingEnabled); 313Assert.Equal(SystemInformation.IsHotTrackingEnabled, SystemInformation.IsHotTrackingEnabled); 319Assert.Equal(SystemInformation.IsIconTitleWrappingEnabled, SystemInformation.IsIconTitleWrappingEnabled); 325Assert.Equal(SystemInformation.IsKeyboardPreferred, SystemInformation.IsKeyboardPreferred); 331Assert.Equal(SystemInformation.IsListBoxSmoothScrollingEnabled, SystemInformation.IsListBoxSmoothScrollingEnabled); 337Assert.Equal(SystemInformation.IsMenuAnimationEnabled, SystemInformation.IsMenuAnimationEnabled); 343Assert.Equal(SystemInformation.IsMenuFadeEnabled, SystemInformation.IsMenuFadeEnabled); 349Assert.Equal(SystemInformation.IsMinimizeRestoreAnimationEnabled, SystemInformation.IsMinimizeRestoreAnimationEnabled); 355Assert.Equal(SystemInformation.IsSelectionFadeEnabled, SystemInformation.IsSelectionFadeEnabled); 361Assert.Equal(SystemInformation.IsSnapToDefaultEnabled, SystemInformation.IsSnapToDefaultEnabled); 367Assert.Equal(SystemInformation.IsTitleBarGradientEnabled, SystemInformation.IsTitleBarGradientEnabled); 373Assert.Equal(SystemInformation.IsToolTipAnimationEnabled, SystemInformation.IsToolTipAnimationEnabled); 379int height = SystemInformation.KanjiWindowHeight; 381Assert.Equal(height, SystemInformation.KanjiWindowHeight); 387int delay = SystemInformation.KeyboardDelay; 389Assert.Equal(delay, SystemInformation.KeyboardDelay); 395int speed = SystemInformation.KeyboardSpeed; 397Assert.Equal(speed, SystemInformation.KeyboardSpeed); 403Size size = SystemInformation.MaxWindowTrackSize; 406Assert.Equal(size, SystemInformation.MaxWindowTrackSize); 412Assert.Equal(SystemInformation.MenuAccessKeysUnderlined, SystemInformation.MenuAccessKeysUnderlined); 418Size size = SystemInformation.MenuBarButtonSize; 421Assert.Equal(size, SystemInformation.MenuBarButtonSize); 427Size size = SystemInformation.MenuButtonSize; 430Assert.Equal(size, SystemInformation.MenuButtonSize); 436Size size = SystemInformation.MenuCheckSize; 439Assert.Equal(size, SystemInformation.MenuCheckSize); 445Font font = SystemInformation.MenuFont; 447Assert.Equal(font, SystemInformation.MenuFont); 453int height = SystemInformation.MenuHeight; 455Assert.Equal(height, SystemInformation.MenuHeight); 461int delay = SystemInformation.MenuShowDelay; 463Assert.Equal(delay, SystemInformation.MenuShowDelay); 469Assert.Equal(SystemInformation.MidEastEnabled, SystemInformation.MidEastEnabled); 475Size size = SystemInformation.MinimizedWindowSize; 478Assert.Equal(size, SystemInformation.MinimizedWindowSize); 484Size size = SystemInformation.MinimizedWindowSize; 487Assert.Equal(size, SystemInformation.MinimizedWindowSpacingSize); 493Size size = SystemInformation.MinimumWindowSize; 496Assert.Equal(size, SystemInformation.MinimumWindowSize); 502Size size = SystemInformation.MinWindowTrackSize; 505Assert.Equal(size, SystemInformation.MinWindowTrackSize); 511int count = SystemInformation.MonitorCount; 514Assert.Equal(count, SystemInformation.MonitorCount); 520Assert.Equal(SystemInformation.MonitorsSameDisplayFormat, SystemInformation.MonitorsSameDisplayFormat); 526int count = SystemInformation.MouseButtons; 528Assert.Equal(count, SystemInformation.MouseButtons); 534Assert.Equal(SystemInformation.MouseButtonsSwapped, SystemInformation.MouseButtonsSwapped); 540Size size = SystemInformation.MouseHoverSize; 543Assert.Equal(size, SystemInformation.MouseHoverSize); 549int count = SystemInformation.MouseHoverTime; 551Assert.Equal(count, SystemInformation.MouseHoverTime); 557Assert.Equal(SystemInformation.MousePresent, SystemInformation.MousePresent); 563int count = SystemInformation.MouseSpeed; 565Assert.Equal(count, SystemInformation.MouseSpeed); 571Assert.Equal(SystemInformation.MouseWheelPresent, SystemInformation.MouseWheelPresent); 577int delta = SystemInformation.MouseWheelScrollDelta; 579Assert.Equal(delta, SystemInformation.MouseWheelScrollDelta); 585int lines = SystemInformation.MouseWheelScrollLines; 587Assert.Equal(lines, SystemInformation.MouseWheelScrollLines); 593Assert.Equal(SystemInformation.NativeMouseWheelSupport, SystemInformation.NativeMouseWheelSupport); 599Assert.Equal(SystemInformation.Network, SystemInformation.Network); 605Assert.Equal(SystemInformation.PenWindows, SystemInformation.PenWindows); 611LeftRightAlignment alignment = SystemInformation.PopupMenuAlignment; 613Assert.Equal(alignment, SystemInformation.PopupMenuAlignment); 619PowerStatus status = SystemInformation.PowerStatus; 621Assert.Same(status, SystemInformation.PowerStatus); 627Size size = SystemInformation.PrimaryMonitorMaximizedWindowSize; 630Assert.Equal(size, SystemInformation.PrimaryMonitorMaximizedWindowSize); 636Size size = SystemInformation.PrimaryMonitorSize; 639Assert.Equal(size, SystemInformation.PrimaryMonitorSize); 645Assert.Equal(SystemInformation.RightAlignedMenus, SystemInformation.RightAlignedMenus); 651ScreenOrientation orientation = SystemInformation.ScreenOrientation; 653Assert.Equal(orientation, SystemInformation.ScreenOrientation); 659Assert.Equal(SystemInformation.Secure, SystemInformation.Secure); 665Assert.Equal(SystemInformation.ShowSounds, SystemInformation.ShowSounds); 671int width = SystemInformation.SizingBorderWidth; 673Assert.Equal(width, SystemInformation.SizingBorderWidth); 679Size size = SystemInformation.SmallCaptionButtonSize; 682Assert.Equal(size, SystemInformation.SmallCaptionButtonSize); 688Size size = SystemInformation.SmallIconSize; 691Assert.Equal(size, SystemInformation.SmallIconSize); 697Assert.Equal(SystemInformation.TerminalServerSession, SystemInformation.TerminalServerSession); 703Size size = SystemInformation.ToolWindowCaptionButtonSize; 706Assert.Equal(size, SystemInformation.ToolWindowCaptionButtonSize); 712int height = SystemInformation.ToolWindowCaptionHeight; 714Assert.Equal(height, SystemInformation.ToolWindowCaptionHeight); 720Assert.Equal(SystemInformation.UIEffectsEnabled, SystemInformation.UIEffectsEnabled); 726string domainName = SystemInformation.UserDomainName; 728Assert.Equal(domainName, SystemInformation.UserDomainName); 734Assert.Equal(SystemInformation.UserInteractive, SystemInformation.UserInteractive); 740string name = SystemInformation.UserName; 743Assert.Equal(name, SystemInformation.UserName); 749int thickness = SystemInformation.VerticalFocusThickness; 751Assert.Equal(thickness, SystemInformation.VerticalFocusThickness); 757int thickness = SystemInformation.VerticalResizeBorderThickness; 759Assert.Equal(thickness, SystemInformation.VerticalResizeBorderThickness); 765int height = SystemInformation.VerticalScrollBarArrowHeight; 767Assert.Equal(height, SystemInformation.VerticalScrollBarArrowHeightForDpi(LogicalDpi)); 768Assert.Equal(height, SystemInformation.VerticalScrollBarArrowHeight); 774int height = SystemInformation.VerticalScrollBarThumbHeight; 776Assert.Equal(height, SystemInformation.VerticalScrollBarThumbHeight); 782int width = SystemInformation.VerticalScrollBarWidth; 784Assert.Equal(width, SystemInformation.GetVerticalScrollBarWidthForDpi(LogicalDpi)); 785Assert.Equal(width, SystemInformation.VerticalScrollBarWidth); 791Rectangle screen = SystemInformation.VirtualScreen; 794Assert.Equal(screen, SystemInformation.VirtualScreen); 800Rectangle workingArea = SystemInformation.WorkingArea; 805Assert.Equal(workingArea, SystemInformation.WorkingArea); 820Size size = SystemInformation.GetBorderSizeForDpi(dpi); 829int width = SystemInformation.GetHorizontalScrollBarArrowWidthForDpi(dpi); 837int height = SystemInformation.GetHorizontalScrollBarHeightForDpi(dpi); 845Font font = SystemInformation.GetMenuFontForDpi(dpi); 853int width = SystemInformation.GetVerticalScrollBarWidthForDpi(dpi); 861int height = SystemInformation.VerticalScrollBarArrowHeightForDpi(dpi);
System\Windows\Forms\ToolStripButtonTests.cs (6)
81Assert.Equal(SystemInformation.MenuAccessKeysUnderlined, item.ShowKeyboardCues); 162Assert.Equal(SystemInformation.MenuAccessKeysUnderlined, item.ShowKeyboardCues); 249Assert.Equal(SystemInformation.MenuAccessKeysUnderlined, item.ShowKeyboardCues); 339Assert.Equal(SystemInformation.MenuAccessKeysUnderlined, item.ShowKeyboardCues); 427Assert.Equal(SystemInformation.MenuAccessKeysUnderlined, item.ShowKeyboardCues); 525Assert.Equal(SystemInformation.MenuAccessKeysUnderlined, item.ShowKeyboardCues);
System\Windows\Forms\ToolStripControlHostTests.cs (1)
110Assert.Equal(SystemInformation.MenuAccessKeysUnderlined, item.ShowKeyboardCues);
System\Windows\Forms\ToolStripDropDownItemTests.cs (4)
81Assert.Equal(SystemInformation.MenuAccessKeysUnderlined, item.ShowKeyboardCues); 170Assert.Equal(SystemInformation.MenuAccessKeysUnderlined, item.ShowKeyboardCues); 269Assert.Equal(SystemInformation.MenuAccessKeysUnderlined, item.ShowKeyboardCues); 377Assert.Equal(SystemInformation.MenuAccessKeysUnderlined, item.ShowKeyboardCues);
System\Windows\Forms\ToolStripDropDownTests.cs (12)
79Assert.Equal(SystemInformation.IsDropShadowEnabled, control.DropShadowEnabled); 136Assert.Equal(SystemInformation.WorkingArea.X + 2, control.Right); 169Assert.Equal(SystemInformation.IsDropShadowEnabled ? 0x20808 : 0x808, createParams.ClassStyle); 184yield return new object[] { true, SystemInformation.IsDropShadowEnabled ? 0x20808 : 0x808 }; 215yield return new object[] { true, 1.0, SystemInformation.IsDropShadowEnabled ? 0x20808 : 0x808, -0x7E000000, 0x10000 }; 216yield return new object[] { true, 0.5, SystemInformation.IsDropShadowEnabled ? 0x20008 : 0x8, -0x7E000000, 0x90000 }; 217yield return new object[] { false, 1.0, SystemInformation.IsDropShadowEnabled ? 0x20008 : 0x8, 0x46000000, 0x10000 }; 218yield return new object[] { false, 0.5, SystemInformation.IsDropShadowEnabled ? 0x20008 : 0x8, 0x46000000, 0x10000 }; 1931expected.X = Math.Max(expected.X, SystemInformation.WorkingArea.X); 1932expected.Y = Math.Max(expected.Y, SystemInformation.WorkingArea.Y); 1934if (expectedLocationChangedCallCount == 0 && SystemInformation.WorkingArea.Location != Point.Empty) 5005var nonClientSize = SystemInformation.BorderSize;
System\Windows\Forms\ToolStripItemTests.cs (3)
80Assert.Equal(SystemInformation.MenuAccessKeysUnderlined, item.ShowKeyboardCues); 165Assert.Equal(SystemInformation.MenuAccessKeysUnderlined, item.ShowKeyboardCues); 260Assert.Equal(SystemInformation.MenuAccessKeysUnderlined, item.ShowKeyboardCues);
System\Windows\Forms\ToolStripMenuItemTests.cs (1)
88Assert.Equal(SystemInformation.MenuAccessKeysUnderlined, item.ShowKeyboardCues);
System\Windows\Forms\ToolStripSeparatorTests.cs (1)
78Assert.Equal(SystemInformation.MenuAccessKeysUnderlined, item.ShowKeyboardCues);
System\Windows\Forms\ToolStripTests.cs (1)
7315await Assert.ThrowsAsync<TaskCanceledException>(() => Task.Delay(SystemInformation.MouseHoverTime * 2, cancellationTokenSource.Token));
System\Windows\Forms\UpDownBaseTests.cs (8)
719yield return new object[] { BorderStyle.Fixed3D, new Size(122, Control.DefaultFont.Height + SystemInformation.BorderSize.Height * 4 + 3) }; 720yield return new object[] { BorderStyle.FixedSingle, new Size(122, Control.DefaultFont.Height + SystemInformation.BorderSize.Height * 4 + 3) }; 725yield return new object[] { BorderStyle.Fixed3D, new Size(123, Control.DefaultFont.Height + SystemInformation.BorderSize.Height * 4 + 3) }; 726yield return new object[] { BorderStyle.FixedSingle, new Size(121, Control.DefaultFont.Height + SystemInformation.BorderSize.Height * 4 + 3) }; 756yield return new object[] { BorderStyle.Fixed3D, 0, 0, new Size(122, Control.DefaultFont.Height + SystemInformation.BorderSize.Height * 4 + 3) }; 757yield return new object[] { BorderStyle.FixedSingle, 0, 1, new Size(122, Control.DefaultFont.Height + SystemInformation.BorderSize.Height * 4 + 3) }; 762yield return new object[] { BorderStyle.Fixed3D, 0, 0, new Size(123, Control.DefaultFont.Height + SystemInformation.BorderSize.Height * 4 + 3) }; 763yield return new object[] { BorderStyle.FixedSingle, 1, 1, new Size(123, Control.DefaultFont.Height + SystemInformation.BorderSize.Height * 4 + 3) };
TextBoxBaseTests.cs (1)
16private static readonly int s_preferredHeight = Control.DefaultFont.Height + SystemInformation.BorderSize.Height * 4 + 3;
TextBoxTests.cs (1)
13private static readonly int s_preferredHeight = Control.DefaultFont.Height + SystemInformation.BorderSize.Height * 4 + 3;
TrackBarTests.cs (1)
14public 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;