article

Setting tab stops in a Windows Forms TextBox control

The Windows Forms `TextBox` control doesn't offer an out of the box method for setting tabstops within the control, this article describes how to achieve this via p/invoke.

avatar
Richard Moss
article

Using message filters in Windows Forms applications

An overview of how to use the `IMessageFilter` interface to intercept Windows Messages within your application.

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

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