Category: Programming

  • When should a program’s UI animations be disabled?

    Modern frameworks like the Windows Presentation Foundation, its relative Silverlight and the upcoming Windows Runtime make it easy to add animations to a program’s graphical user interface. When implemented well, animations subtly improve the user experience and can demonstrate a high level of polish in your application. The Zune client software and Windows Live Messenger […]

  • Theming & Visual Styles in Windows 8

    The following is based on the Windows Developer Preview and might not accurately represent the final version of Windows 8. A significant change in Windows 8 is the removal of support for Windows classic theming. In the Windows Developer Preview, there is no Windows Classic theme, and all themes (including Windows Basic and the four […]

  • Windows Theme Fonts Redux & Sample Code

    View source on GitHub. In a post earlier this year, I investigated how to retrieve information about theme fonts in Windows. Briefly, the Visual Styles APIs can be used when visual styles are enabled, but values need to be hard-coded (to some extent) otherwise. Andrew Powell commented on my previous post noting difficulties in implementing […]

  • Replacement Lisp Icon

    GNU CLISP under Windows sets the default icon for Lisp files (.lisp, .lsp, .cl) to this: I decided to make a new icon based on the style found in recent versions of Visual Studio: This is what I came up with: The .ico file includes 32-bit images at sizes 256x256px (PNG-compressed), 48x48px, 32x32px and 16x16px. […]

  • Installing CUSP (Eclipse Lisp Plugin)

    Update (2011-09-28): My own instructions didn’t work when I tried to install Eclipse and CUSP on a new machine. After much trial and error, I finally got a working setup by downloading a newer version of CUSP from here (version 1.0.414). This seems to work with SBCL 1.0.51 and Eclipse 3.7 (I downloaded the Classic […]

  • Windows Theme Fonts

    View source on GitHub. Update: See this post for a sample implementation in WPF. Have you ever wondered how to access the various font colours and styles found throughout Windows, such as that of the ‘Main Instruction’ text in the Task Dialog shown above? If you are using WPF, the SystemFonts class might sound promising […]

  • WM_DWMCOLORIZATIONCOLORCHANGED doesn’t give the Aero Glass base colour

    From MSDN: WM_DWMCOLORIZATIONCOLORCHANGED Message Sent to all top-level windows when the colorization color has changed. Parameters wParam: Specifies the new colorization color. The color format is 0xAARRGGBB. lParam: Specifies whether the new color is blended with opacity. We receive this message when the Aero Glass colour changes. Unfortunately, the value contained in wParam is not […]

  • SetDPI Utility

    View source on GitHub. Updated 2013-01-06. Ken Silverman’s PNG compression tool PNGOUT (complemented nicely by the free .NET frontend PNGGauntlet) can be remarkably effective at trimming the size of PNGs without altering the image described within. However, in its quest to remove anything non-essential, PNGOUT by default strips out the image’s DPI (in fact PPI) […]

  • Pixel Measurements in WPF

    Part of the beauty of the Windows Presentation Foundation is that it is designed to be resolution independent – that is, a WPF application should scale perfectly no matter the system’s DPI setting (excluding any bitmap graphics, which mightn’t look as nice as the vector parts). Instead of measuring things in pixels, WPF uses Device […]

  • Small Icon Size & DPI in Windows

    The GetSystemMetrics function in Windows retrieves system metrics and configuration settings. One such metric is the recommended size (width and height) of ‘small icons’: Small icons typically appear in window captions and in small icon view. Another place where small icons show up is the notification area. MSDN contains a guide to Creating DPI-Aware Applications. […]