PageRenderTime 18ms CodeModel.GetById 14ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/Visual Studio 2008/VBWPFClipboardViewer/Readme.txt

#
Plain Text | 37 lines | 26 code | 11 blank | 0 comment | 0 complexity | d278e4ad8d8dd4fca07cd9f28c066b3f MD5 | raw file
 1========================================================================
 2               WPF Clipboard Viewer Project Overview
 3========================================================================
 4
 5/////////////////////////////////////////////////////////////////////////////
 6Use:
 7
 8This Sample demonstrates how to monitor Windows clipboard changes in a WPF
 9application.
10
11/////////////////////////////////////////////////////////////////////////////
12
13In order to be notified by the system when the clipboard content changes, an
14application must use the SetClipboardViewer function (user32.dll) to add its
15window into the chain of clipboard viewers.
16
17Clipboard viewer windows receive a WM_DRAWCLIPBOARD message whenever the 
18content of the clipboard changes. And the WM_CHANGECBCHAIN message is sent 
19to the first window in the clipboard viewer chain when a window is being 
20removed from the chain.
21
22In a WPF application, we use HwndSource class to register a Win32 window 
23message handler to process the messages.
24
25This sample also shows a workaround for a known issue in WPF 
26Clipboard.GetImage() method.
27
28/////////////////////////////////////////////////////////////////////////////
29References:
30
31Clipboard
32http://msdn.microsoft.com/en-us/library/ms648709(VS.85).aspx
33
34Clipboard Class (System.Windows)
35http://msdn.microsoft.com/en-us/library/system.windows.clipboard.aspx
36
37/////////////////////////////////////////////////////////////////////////////