PageRenderTime 58ms CodeModel.GetById 16ms RepoModel.GetById 0ms 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. Use:
  6. This Sample demonstrates how to monitor Windows clipboard changes in a WPF
  7. application.
  8. /////////////////////////////////////////////////////////////////////////////
  9. In order to be notified by the system when the clipboard content changes, an
  10. application must use the SetClipboardViewer function (user32.dll) to add its
  11. window into the chain of clipboard viewers.
  12. Clipboard viewer windows receive a WM_DRAWCLIPBOARD message whenever the
  13. content of the clipboard changes. And the WM_CHANGECBCHAIN message is sent
  14. to the first window in the clipboard viewer chain when a window is being
  15. removed from the chain.
  16. In a WPF application, we use HwndSource class to register a Win32 window
  17. message handler to process the messages.
  18. This sample also shows a workaround for a known issue in WPF
  19. Clipboard.GetImage() method.
  20. /////////////////////////////////////////////////////////////////////////////
  21. References:
  22. Clipboard
  23. http://msdn.microsoft.com/en-us/library/ms648709(VS.85).aspx
  24. Clipboard Class (System.Windows)
  25. http://msdn.microsoft.com/en-us/library/system.windows.clipboard.aspx
  26. /////////////////////////////////////////////////////////////////////////////