58 references to PInvoke
System.Windows.Forms.Primitives (58)
Interop\Richedit\Interop.PARAFORMAT.cs (1)
22
public fixed int rgxTabs[(int)
PInvoke
.MAX_TAB_STOPS];
Microsoft\VisualStudio\Shell\IVsPerPropertyBrowsing.cs (1)
183
/// <see cref="ITypeInfo.GetDocumentation(int, BSTR*, BSTR*, out uint, BSTR*)"/> with <see cref="
PInvoke
.MEMBERID_NIL"/>.
System\Windows\Forms\AccessibilityExtensions.cs (2)
11
/// <inheritdoc cref="
PInvoke
.LresultFromObject(Guid*, WPARAM, IUnknown*)"/>
18
return
PInvoke
.LresultFromObject(
System\Windows\Forms\Automation\UiaTextProvider.cs (1)
125
return (int)
PInvoke
.SendInput(1, i, sizeof(INPUT));
System\Windows\Forms\Automation\UiaTextRange.cs (7)
360
PInvoke
.GetCaretPos(out Point endlinePoint);
874
private static int GetBackgroundColor() => (int)
PInvoke
.GetSysColor(SYS_COLOR_INDEX.COLOR_WINDOW);
877
=> (int)(((int)windowStyle &
PInvoke
.ES_UPPERCASE) != 0 ? CapStyle.AllCap : CapStyle.None);
892
private static int GetForegroundColor() => (int)
PInvoke
.GetSysColor(SYS_COLOR_INDEX.COLOR_WINDOWTEXT);
895
=> (int)(((int)windowStyle &
PInvoke
.ES_CENTER) != 0
897
: ((int)windowStyle &
PInvoke
.ES_RIGHT) != 0
914
PInvoke
.UiaGetReservedNotSupportedValue(&unknown).ThrowOnFailure();
System\Windows\Forms\DeviceContextExtensions.cs (9)
37
PInvoke
.Rectangle(hdc, left, top, right, bottom);
47
PInvoke
.FillRect(
92
PInvoke
.MoveToEx(hdc, lines[i], lines[i + 1], &oldPoint);
93
PInvoke
.LineTo(hdc, lines[i + 2], lines[i + 3]);
94
PInvoke
.MoveToEx(hdc, oldPoint.X, oldPoint.Y, lppt: null);
101
/// Calls <see cref="
PInvoke
.GetNearestColor(HDC, COLORREF)"/> to get the nearest color for the given
119
Color newColor = ColorTranslator.FromWin32((int)
PInvoke
.GetNearestColor(hdc, (COLORREF)(uint)ColorTranslator.ToWin32(color)).Value);
146
PInvoke
.Ellipse(hdc, left, top, right, bottom);
156
PInvoke
.FillRect(
System\Windows\Forms\FileDialogCustomPlace.cs (2)
70
int result =
PInvoke
.SHGetKnownFolderPath(reference, 0, HANDLE.Null, (PWSTR*)path);
78
return
PInvoke
.SHCreateShellItem(filePathString);
System\Windows\Forms\Internals\ScaleHelper.cs (13)
71
return (int)
PInvoke
.GetDpiForSystem();
81
HRESULT result =
PInvoke
.GetProcessDpiAwareness(
109
DPI_AWARENESS_CONTEXT dpiAwareness =
PInvoke
.GetThreadDpiAwarenessContextInternal();
311
PInvoke
.GetSystemMetricsForDpi(SYSTEM_METRICS_INDEX.SM_CXSMICON, OneHundredPercentLogicalDpi),
312
PInvoke
.GetSystemMetricsForDpi(SYSTEM_METRICS_INDEX.SM_CXSMICON, OneHundredPercentLogicalDpi))
373
DPI_AWARENESS_CONTEXT dpiAwareness =
PInvoke
.GetThreadDpiAwarenessContextInternal();
402
PInvoke
.GetProcessDpiAwareness(HANDLE.Null, out PROCESS_DPI_AWARENESS processDpiAwareness);
416
return
PInvoke
.IsProcessDPIAware() ? HighDpiMode.SystemAware : HighDpiMode.DpiUnaware;
440
PInvoke
.IsValidDpiAwarenessContext(DPI_AWARENESS_CONTEXT.DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2)
445
PInvoke
.IsValidDpiAwarenessContext(DPI_AWARENESS_CONTEXT.DPI_AWARENESS_CONTEXT_UNAWARE_GDISCALED)
451
success =
PInvoke
.SetProcessDpiAwarenessContext(dpiAwareness);
463
success =
PInvoke
.SetProcessDpiAwareness(dpiAwareness).Succeeded;
484
success =
PInvoke
.SetProcessDPIAware();
System\Windows\Forms\Internals\ScaleHelper.DpiAwarenessScope.cs (7)
42
_originalDpiAwarenessContext =
PInvoke
.GetThreadDpiAwarenessContext();
45
if (!
PInvoke
.AreDpiAwarenessContextsEqual(_originalDpiAwarenessContext, context))
47
if (
PInvoke
.SetThreadDpiAwarenessContext(context) == 0)
55
_originalDpiHostingBehavior =
PInvoke
.GetThreadDpiHostingBehavior();
61
_originalDpiHostingBehavior =
PInvoke
.SetThreadDpiHostingBehavior(behavior);
77
&&
PInvoke
.SetThreadDpiHostingBehavior(_originalDpiHostingBehavior) == DPI_HOSTING_BEHAVIOR.DPI_HOSTING_BEHAVIOR_INVALID)
83
&&
PInvoke
.SetThreadDpiAwarenessContext(_originalDpiAwarenessContext) == IntPtr.Zero)
System\Windows\Forms\Internals\ThemingScope.cs (7)
29
&& !(
PInvoke
.GetCurrentActCtx(¤t) && current == s_hActCtx))
32
bool success =
PInvoke
.ActivateActCtx(s_hActCtx, &cookie);
42
bool success =
PInvoke
.DeactivateActCtx(0, _cookie);
60
dwFlags =
PInvoke
.ACTCTX_FLAG_HMODULE_VALID |
PInvoke
.ACTCTX_FLAG_RESOURCE_NAME_VALID,
66
s_hActCtx =
PInvoke
.CreateActCtx(act);
106
s_hActCtx =
PInvoke
.CreateActCtx(act);
Windows\Win32\Interop.RegisteredMessage.cs (2)
17
s_wmMouseEnterMessage =
PInvoke
.RegisterWindowMessage("WinFormsMouseEnter");
30
s_wmUnSubclass =
PInvoke
.RegisterWindowMessage("WinFormsUnSubclass");
Windows\Win32\UI\HiDpi\DPI_AWARENESS_CONTEXT.cs (1)
26
return
PInvoke
.AreDpiAwarenessContextsEqual(this, dpiContext);
Windows\Win32\UI\Shell\FolderBrowserHelper.cs (5)
12
/// Helper for the legacy <see cref="
PInvoke
.SHGetPathFromIDListEx(ITEMIDLIST*, PWSTR, uint, GPFIDL_FLAGS)" /> API.
24
PInvoke
.SHGetSpecialFolderLocation(rootFolderCsidl, out ITEMIDLIST* rootFolderId);
27
PInvoke
.SHGetSpecialFolderLocation((int)Environment.SpecialFolder.Desktop, out rootFolderId);
53
ITEMIDLIST* resultId =
PInvoke
.SHBrowseForFolder(&bi);
64
bool success =
PInvoke
.SHGetPathFromIDListEx(resultId, b, (uint)buffer.Length, GPFIDL_FLAGS.GPFIDL_UNCPRINTER);