Get the Width and Height of Any Window in C# with GetWindowRect
Read the position and size of any window, including other applications’ windows, with the GetWindowRect API in C#, plus the DPI and border traps.
Read the position and size of any window, including other applications’ windows, with the GetWindowRect API in C#, plus the DPI and border traps.
Turn a System.Drawing Image into a byte array in PNG, JPEG or its original format, and know when File.ReadAllBytes is the better answer.
Load an Image from a byte array in C# without the “generic error occurred in GDI+” trap, plus the WPF BitmapImage version.
Show the WinForms FontDialog, preselect the current font, add color and a live Apply preview, and handle Cancel correctly.
Show the WinForms ColorDialog, preselect a color, keep the user’s custom colors between calls and avoid the Color equality trap.