In the context of client Windows applications developer,
process of given functionality usage in your own applications is simple enough.
Interaction with operation system occurs at unmanaged level through
COM-objects. This is the reason to realize managed wraps for .NET applications.
All this work has already done and taken place in .NET Interop Sample Library.
The .NET Interop Sample Library consists of a set of
components and demonstration applications. We will not give detail information
about everyone of them. It is important for us that there are «Vista Bridge
Sample Library» project and «Windows7.DesktopIntegration».
There is WindowsFormsExtensions class as a part of the
project «Windows7.DesktopIntegration». This class implements a set of extension
methods for a form of Windows Forms platform. Unfortunately, at the moment of
this article writing in that class there was not WPF applications support.
However, this shortage is very simply to be corrected on your own. All that is
required in this case is to change the way of getting a handle of window.
We will use this library to construct of all demonstration
applications in the article.