A little application that monitors the clipboard. It shows the clipboard history in a popup window and allows to put any entry back into the clipboard.

It contains a class that monitors the system clipboard: ClipboardMonitor. The class creates internally a NativeWindow that registers as clipboard viewer and processes the messages send by the system (if the content of the clipboard changed).

The app also tries to show a way to create a popup window (by processing a few windows messages) and to start an application in the system tray without showing the main window.


I have seen that the topic of starting an application displaying a notify icon in the system tray area is an often discussed topic in news groups... although the solution is quite simple.

Once the NotifyIcon control is placed on the form, you only need to instanciate the form. Once instanciated the NotifyIcon control shows the icon in the system tray. It is not required to show the form!
The application is then started without providing a form. That means that it can only be closed by calling Application.Exit() and not by closing the main form (there is no main form provided).

MainForm form = new MainForm();
Application.Run();

The sample shows also how to inherit from ListBox and create your own custom drawn listbox items. Each listbox item is custom drawn and has a button (visible on the right side of the item when selected). After clicking the button a context menu pops up. It contains actions that can be done on the listbox item.

As last nice feature the app has a class (AutoStarter) that registers or unregisters the application to start with the system. That is done by setting the appropriate keys in the registry.


I hope you enjoy my work.

Version 1.0.1:
- Showing now the icon of the application (if available) that put the item into the clipboard. As suggested by Ion.

Version 1.0.2:
- Fixed minor issues with putting an item back into clipboard.
- Added clear all link to main menu.
- Added limit of max. items in history.

Version 1.0.3:
- Fixed minor bugs.
- Enhanced UI.