Skip to content
github-actions[bot] edited this page Oct 8, 2026 · 5 revisions

Dapplo.Windows

Dapplo.Windows gives .NET applications on Windows access to what .NET itself doesn't cover: windows and their events, keyboard and mouse hooks, the clipboard, DPI awareness, power management, the Restart Manager, file dialogs and more. It was built for Greenshot and is split into small NuGet packages, so you only install what you use.

This wiki has short versions of the guides. The full documentation, with the API reference, is at https://www.dapplo.net/Dapplo.Windows/.

Requirements

  • Windows
  • .NET Framework 4.8 or .NET 10 (the packages target net480 and net10.0-windows)

Upgrading from 2.x? Read the migration guide and the changelog: version 3.0 changes many APIs on purpose.

Pages

Page About
Getting-Started Installation, first steps, how the library uses threads
Window-Management Find, inspect, move and capture windows, window events
SharedMessageWindow Window messages without a window of your own, session changes
Input-Handling Keyboard and mouse hooks, hotkeys, generating input
Clipboard Monitor, read and write the clipboard
DPI-Awareness Follow the DPI of each monitor in WinForms and WPF
System-State Prevent sleep, shut down, wake timers, power events
Restart-Manager Restart registration and installer support
Icon-Creation Extract icons, write ICO and CUR files, capture the cursor
Dialogs File and folder dialogs without WinForms or WPF
Common-Scenarios Recipes which combine several packages

Not in the wiki: Windows Forms and WPF and more packages (Citrix, DWM, devices, registry, sounds, embedded browser).

Packages

Package NuGet What it's for Depends on (Dapplo.Windows.*)
Dapplo.Windows NuGet Window information, enumeration and manipulation, WinEvent hooks, window screenshots and icons Common, Com, DesktopWindowsManager, Gdi32, Icons, Input, Kernel32, Messages, User32
Dapplo.Windows.Automation NuGet UI Automation: scroll windows which draw their own scroll bars (browsers, WPF, Office), e.g. for a scrolling capture Dapplo.Windows, Common, Input, User32
Dapplo.Windows.Clipboard NuGet Monitor, read and write the clipboard, delayed rendering, clipboard history options Kernel32, Messages
Dapplo.Windows.Input NuGet Keyboard and mouse hooks, hotkeys and key sequences, generating input, raw input Common, Messages, User32
Dapplo.Windows.Dpi NuGet DPI calculations, DPI change handling, bitmap scaling, DPI awareness APIs Common, Gdi32, Messages, User32
Dapplo.Windows.Forms NuGet Windows Forms integration: DpiAwareForm, window messages of controls, placement Dapplo.Windows, Dpi, Messages
Dapplo.Windows.Wpf NuGet WPF integration: DPI handling, window messages, conversions, BitmapSource Dapplo.Windows, Dpi, Gdi32, Messages
Dapplo.Windows.Messages NuGet SharedMessageWindow for window messages without a window, session notifications Common
Dapplo.Windows.SystemState NuGet Prevent sleep, sleep / shut down / log off, wake timers, power events Messages
Dapplo.Windows.AppRestartManager NuGet Register for restart, answer shutdown and Restart Manager requests Messages
Dapplo.Windows.InstallerManager NuGet For installers: find, close and restart the processes which lock files -
Dapplo.Windows.Dialogs NuGet File open, file save and folder dialogs without WinForms or WPF Common
Dapplo.Windows.Icons NuGet Extract icons, write ICO and CUR files, capture the mouse cursor Common, Dpi, Gdi32, Kernel32, Messages, Shell32, User32
Dapplo.Windows.Devices NuGet Device and volume arrival / removal notifications Messages
Dapplo.Windows.DesktopWindowsManager NuGet DWM: frame bounds, cloaking, accent color, corners Common
Dapplo.Windows.Citrix NuGet Citrix session detection and client information Common
Dapplo.Windows.EmbeddedBrowser NuGet Let the WinForms WebBrowser use the installed IE version Com
Dapplo.Windows.Multimedia NuGet Play system sounds and WAV data -
Dapplo.Windows.Advapi32 NuGet Registry change notifications, logon SID -
Dapplo.Windows.User32 NuGet User32 P/Invoke: windows, displays, messages Common, Messages
Dapplo.Windows.Gdi32 NuGet GDI / GDI+ P/Invoke and safe handles Common, User32
Dapplo.Windows.Kernel32 NuGet Kernel32 P/Invoke: processes, DLL loading, package identity Common
Dapplo.Windows.Shell32 NuGet Shell32 P/Invoke: taskbar, icons Common
Dapplo.Windows.Com NuGet COM helpers Common
Dapplo.Windows.Common NuGet Shared structs (NativeRect, ...), HResult, WindowsVersion -

Build status

Build Coverage Status

License

MIT, see LICENSE.

Clone this wiki locally