This is a preview version of Cyotek's blog and may be missing functionality and/or unstable. Please visit for the current version of the blog.
If you encounter any problems using this preview site, please contact us with the details.

Archived posts for All of 2013

Tools we use - 2013 edition

tools 2013 0 Comments

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.

I actually wrote this post in October last year (2012 that is) but in the end forgot to post it. That sounds marginally better than "I lost the post until search was added to's admin system"! Surprisingly little is different in the 15 months since it was first written. Either nothing has changed or I'm stuck in my ways with my head in the sand. I'm sure it's the latter!

Read More

How to be notified when your application is activated and deactivated

c# winforms interop pinvoke WM_ACTIVATEAPP 2 Comments Downloads

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?

Read More

Extending the LabelEdit functionality of a TreeView to include validation

c# winforms treeview 0 Comments Downloads

In my last post I described how to extend the default label edit funcionality of a TreeView control to be somewhat more flexible, by allowing you to specify custom text other than blindly using the text of the TreeNode being edited.

This post will extend the original code to include custom validation. For example, you may wish to restrict the available characters, or check to see if the value entered doesn't match an existing value.

Read More

Specifying custom text when using the LabelEdit functionality of a TreeView

c# winforms api treeview SendMessage TVM_GETEDITCONTROL WM_SETTEXT pinvoke 0 Comments Downloads

Recently I was updating a support tool that displays documents in raw form and allows editing of them. This tool is centred around a TreeView, and the Text property of each TreeNode is a concatenation of a name and one or more values.

The problem with this approach is if you wish to allow the nodes to be edited using the built in functionality you're in trouble as by default you can't actually influence the text that appears in the in-line editor. In other applications of a similar nature I used owner-drawn trees as I was using different styles for the name and the value. In this case, I just wanted the standard look.

Read More

Cyotek Add Projects Extension updated for Visual Studio 2013 RTM

extension vsix visual studio 0 Comments Downloads

In my last post I introduced Cyotek Add Projects, a simple extension for Visual Studio that allowed you to add multiple projects to a solution.

However, I'd left the VSIX manifest version at 11.0, meaning it would only install on Visual Studio 2012. I've updated this so that it should install on Visual Studio 2012 or higher - certainly it's now installed on my fresh install of Visual Studio 2013.

Read More

Visual Studio Extension for adding multiple projects to a solution

c# extension vsix visual studio 24 Comments Downloads

My solutions have lots of references to other projects, either common libraries or unit testing libraries. Neither of these scenarios lend well to manual binary references or NuGet packages, so I have lots of source code projects loaded for each solution.

When creating a new solution (or retro fitting an existing solution to use new libraries), I end up using File | Add | Existing project a lot. As I was curious about how extensions in Visual Studio worked, I decided to write a very simple one to ease the grunt work of adding multiple common projects.

Read More

Getting the hWnd of the edit component within a ComboBox control

c# winforms GetComboBoxInfo COMBOBOXINFO 0 Comments Downloads

I'm currently in the process of dusting off the bugs from a tool written back in 2011. One of the bugs involves an editable ComboBox control paired with a separate Button control. When the button is clicked a popup menu is shown, and when an item in this menu is clicked, the text of the ComboBox is updated.

The problem with this scenario is by default, as soon as the ComboBox loses focus, the SelectionStart, SelectionLength and SelectedText properties are reset, thus preventing my little menu from replacing the selected text. While this article doesn't solve this problem (I'll save that for the next article!), it does describe how you can get the hWnd, or window handle (in .NET terms the Handle) of the edit component, thus opening th...

Read More

Downloading new and changed Azure storage blobs at scheduled intervals

c# azure luminitix 0 Comments Downloads

I recently finished moving our Lumitix server from Amazon's EC2 into a hybrid of an Azure Web Role and Azure Blob Storage, and a local machine. It's been running for a couple of weeks now without a spot of bother - I really like Azure.

However, one thing I did need was a way of pulling down the files in blob storage so the local loader service could process them. I ended up writing a rough and ready scheduling app to download any new files (and as an afterthought, modified files or optionally uploading of local files).

Read More

Creating long running Windows Forms applications without a start-up form

c# winforms applicationcontext 8 Comments Downloads

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 a single start-up form which definitely isn't desirable when you want to have a hidden UI, especially as hiding this form isn't as straightforward as you might expect. Fortunately however, the framework provides us with the ApplicationContext class that we can use to create a different approach to managing the application.

Read More

ImageBox update

c# imagebox 18 Comments Downloads

Today we've released a new updated version of the ImageBox control, with a nice collection of enhancements and a few bug fixes.

Full change log for this update:

Read More