Introduces a custom Windows Forms control that resembles a ComboBox with a TreeView for its drop-down portion. Explains how the control is implemented, extending Control and using visual styles to paint the main part of the control, then using ToolStripDropDown and custom rendering to create the tree and popup. Supports images, sorting, scrolling and paths. Full source code provided. Continue reading

Covers the development and theory behind an extended ComboBox control that displays its items in groups/categories. Explains the principles behind Windows Forms data binding and how property values can be easily retrieved from data sources using BindingSource and PropertyDescriptor objects. Also details the best-practice techniques for measuring and painting an OwnerDrawVariable combo box in code. Examples and source code are provided. Continue reading

Explains how to host Preview Handlers (COM interface IPreviewHandler) in Windows Forms applications. Preview Handlers are used by Windows Explorer and Microsoft Outlook to display embedded previews of documents and media files. You can download a custom control that will automatically look up the correct Preview Handler in the Registry, load it and preview a file. Continue reading