article

ColorPicker Controls 1.0.4.0 Update

The [ColorPicker Controls](https://github.com/cyotek/Cyotek.Windows.Forms.ColorPicker) have been updated to version 1.0.4.0. This is a fairly substantial update, with quite a few bug fixes and enhancements to the code. I'll also briefly discuss plans for future updates to the library.

avatar
Richard Moss
article

Adding drag handles to an ImageBox to allow resizing of selection regions

The `ImageBox` control is already a versatile little control and I use it for all sorts of tasks. One of the features I recently wanted was to allow users to be able to select a source region, then adjust this as needed. The control already allows you to draw a selection region, but if you need to adjust that ... well, you can't. You can only draw a new region. This article describes how to extend the `ImageBox` to include the ability to resize the selection region. A older demonstration which shows how to drag the selection around has also been incorporated, in a more tidy fashion than the demo.

avatar
Richard Moss
article

Writing Photoshop Color Swatch (aco) files using C#

The second in a two part series that describes how to load and save Adobe Photoshop colour swatch files using C#. This second article provides a full example project that will write RGB and HSL based swatch files.

avatar
Richard Moss
article

Reading Photoshop Color Swatch (aco) files using C#

The first of a two part series which describes how to load and ultimately save Adobe Photoshop colour swatch files using C#. This first article describes the file format, and provides a full example project that will read RGB based swatch files.

avatar
Richard Moss
article

Loading the color palette from a BBM/LBM image file using C#

I took a break from arguing with our GIF decoder to take a quick look at the BBM format as I have a few files in that format containing colour palettes I wished to extract. When I looked into this, I found a BBM file is essentially an LBM file without any image data, so I set to work at writing a new palette serializer for reading and writing the palette files. This article describes how to read the palettes from BBM and LBM files.

avatar
Richard Moss
article

Tools we use - 2013 edition

As another year enters its final stages, I decided I would log the primary tools I use for my developer role, should be an interesting experiment to compare with each year, if I don't get distracted by something shiny.

avatar
Richard Moss
article

How to be notified when your application is activated and deactivated

I recently had a requirement where a user was able to perform an action externally to my application, and my application then had to detect this for processing. I could of course just had a poller running away in the background to check, but as the requirement also needed user input, why not just wait until the user switched back to my application, then check and deal with accordingly? This article describes how to intercept the `WM_ACTIVATEAPP` message from your C# application and put it to good use.

avatar
Richard Moss
article

Extending the LabelEdit functionality of a TreeView to include validation

An article which describes how to add validation support to a `TreeView` control that is using custom label edit functionality.

avatar
Richard Moss
article

Specifying custom text when using the LabelEdit functionality of a TreeView

An article which describes a robust yet simple way to have custom text when using the `LabelEdit` functionality of a `TreeView` and working around the limitations of Windows Forms using C# along with the `TVM_GETEDITCONTROL` and `WM_SETTEXT` messages.

avatar
Richard Moss
article

Visual Studio Extension for adding multiple projects to a solution

This article describes a simple extension that can be used to add multiple projects at once to a Visual Studio solution.

avatar
Richard Moss
article

Getting the hWnd of the edit component within a ComboBox control

A short tip which describes how to access the hWnd of the edit component contained within a `ComboBox` control via the Win32 API using `GetComboBoxInfo` and `COMBOBOXINFO`.

avatar
Richard Moss