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.
2013 Blog Posts Articles and information on C# and .NET development topics
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.
An article which describes how to add validation support to a
TreeView control that is using custom label edit functionality.
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
A quick note about Visual Studio 2013 support.
This article describes a simple extension that can be used to add multiple projects at once to a Visual Studio solution.
A short tip which describes how to access the hWnd of the edit component contained within a
ComboBox control via the Win32 API using
A sample project which downloads new and changed blobs from Azure storage, and optionally uploads new and changed local files.
Sometimes you may wish to create an application that sits running in the background but doesn't actually display an initial user interface. However, the user can interact with the application and so therefore its not appropriate to be a service. Often such applications are accessible from a system tray icon. Another viable requirement might be for multiple top level windows, for example recent versions of Microsoft Word, where each document has its own application window.
By default however, a normal Windows Form application displays the start-up form which definitely isn't desirable, especially as hiding this form isn't as straightforward as you might expect. Fortunately however, the framework provides us with the
ApplicationContext class that can be used by
This article describes how to use application contexts to create an application that initially has only a system tray icon to which further functionality can be accessed.
Update 188.8.131.52 of the ImageBox control is now available, with a large number of new features and bug fixes.
Enums are useful language features. But what happens when you want to display a string version of an enum member rather than just casting the member to a string? You could manually create a switch statement for conversion, and periodically update such functions when extending the source enum. Or you could use the power of reflection and attributes to do it automatically.
This article describes extending a custom
TypeConverter created previously to support better code generation, expandable properties, and dropdown lists containing standard values.
Type converters allow classes to be edited via designers such as the
PropertyGrid. This article details how to create a simple type converter to and from a
string for use with a
The color picker controls library has been updated.
A quick overview of a new open source library for selecting colors in Windows Forms applications.
An article which describes how to use C# to split a rectangle into multiple smaller parts based on pairs of co-ordinates.
An article which describes how to create a custom ErrorProvider in C# that changes the background colour of fields with validation errors.