58 references to PInvoke
System.Windows.Forms.Primitives (58)
Interop\Richedit\Interop.PARAFORMAT.cs (1)
22public 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*)"/> 18return PInvoke.LresultFromObject(
System\Windows\Forms\Automation\UiaTextProvider.cs (1)
125return (int)PInvoke.SendInput(1, i, sizeof(INPUT));
System\Windows\Forms\Automation\UiaTextRange.cs (7)
360PInvoke.GetCaretPos(out Point endlinePoint); 874private static int GetBackgroundColor() => (int)PInvoke.GetSysColor(SYS_COLOR_INDEX.COLOR_WINDOW); 877=> (int)(((int)windowStyle & PInvoke.ES_UPPERCASE) != 0 ? CapStyle.AllCap : CapStyle.None); 892private 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 914PInvoke.UiaGetReservedNotSupportedValue(&unknown).ThrowOnFailure();
System\Windows\Forms\DeviceContextExtensions.cs (9)
37PInvoke.Rectangle(hdc, left, top, right, bottom); 47PInvoke.FillRect( 92PInvoke.MoveToEx(hdc, lines[i], lines[i + 1], &oldPoint); 93PInvoke.LineTo(hdc, lines[i + 2], lines[i + 3]); 94PInvoke.MoveToEx(hdc, oldPoint.X, oldPoint.Y, lppt: null); 101/// Calls <see cref="PInvoke.GetNearestColor(HDC, COLORREF)"/> to get the nearest color for the given 119Color newColor = ColorTranslator.FromWin32((int)PInvoke.GetNearestColor(hdc, (COLORREF)(uint)ColorTranslator.ToWin32(color)).Value); 146PInvoke.Ellipse(hdc, left, top, right, bottom); 156PInvoke.FillRect(
System\Windows\Forms\FileDialogCustomPlace.cs (2)
70int result = PInvoke.SHGetKnownFolderPath(reference, 0, HANDLE.Null, (PWSTR*)path); 78return PInvoke.SHCreateShellItem(filePathString);
System\Windows\Forms\Internals\ScaleHelper.cs (13)
71return (int)PInvoke.GetDpiForSystem(); 81HRESULT result = PInvoke.GetProcessDpiAwareness( 109DPI_AWARENESS_CONTEXT dpiAwareness = PInvoke.GetThreadDpiAwarenessContextInternal(); 311PInvoke.GetSystemMetricsForDpi(SYSTEM_METRICS_INDEX.SM_CXSMICON, OneHundredPercentLogicalDpi), 312PInvoke.GetSystemMetricsForDpi(SYSTEM_METRICS_INDEX.SM_CXSMICON, OneHundredPercentLogicalDpi)) 373DPI_AWARENESS_CONTEXT dpiAwareness = PInvoke.GetThreadDpiAwarenessContextInternal(); 402PInvoke.GetProcessDpiAwareness(HANDLE.Null, out PROCESS_DPI_AWARENESS processDpiAwareness); 416return PInvoke.IsProcessDPIAware() ? HighDpiMode.SystemAware : HighDpiMode.DpiUnaware; 440PInvoke.IsValidDpiAwarenessContext(DPI_AWARENESS_CONTEXT.DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2) 445PInvoke.IsValidDpiAwarenessContext(DPI_AWARENESS_CONTEXT.DPI_AWARENESS_CONTEXT_UNAWARE_GDISCALED) 451success = PInvoke.SetProcessDpiAwarenessContext(dpiAwareness); 463success = PInvoke.SetProcessDpiAwareness(dpiAwareness).Succeeded; 477success = PInvoke.SetProcessDPIAware();
System\Windows\Forms\Internals\ScaleHelper.DpiAwarenessScope.cs (7)
42_originalDpiAwarenessContext = PInvoke.GetThreadDpiAwarenessContext(); 45if (!PInvoke.AreDpiAwarenessContextsEqual(_originalDpiAwarenessContext, context)) 47if (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(&current) && current == s_hActCtx)) 32bool success = PInvoke.ActivateActCtx(s_hActCtx, &cookie); 42bool success = PInvoke.DeactivateActCtx(0, _cookie); 60dwFlags = PInvoke.ACTCTX_FLAG_HMODULE_VALID | PInvoke.ACTCTX_FLAG_RESOURCE_NAME_VALID, 66s_hActCtx = PInvoke.CreateActCtx(act); 106s_hActCtx = PInvoke.CreateActCtx(act);
Windows\Win32\Interop.RegisteredMessage.cs (2)
17s_wmMouseEnterMessage = PInvoke.RegisterWindowMessage("WinFormsMouseEnter"); 30s_wmUnSubclass = PInvoke.RegisterWindowMessage("WinFormsUnSubclass");
Windows\Win32\UI\HiDpi\DPI_AWARENESS_CONTEXT.cs (1)
20&& (bool)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. 24PInvoke.SHGetSpecialFolderLocation(rootFolderCsidl, out ITEMIDLIST* rootFolderId); 27PInvoke.SHGetSpecialFolderLocation((int)Environment.SpecialFolder.Desktop, out rootFolderId); 53ITEMIDLIST* resultId = PInvoke.SHBrowseForFolder(&bi); 64bool success = PInvoke.SHGetPathFromIDListEx(resultId, b, (uint)buffer.Length, GPFIDL_FLAGS.GPFIDL_UNCPRINTER);