PageRenderTime 36ms CodeModel.GetById 11ms RepoModel.GetById 0ms app.codeStats 0ms

/Visual Studio 2008/VBWPFClipboardViewer/Win32.vb

#
Visual Basic | 43 lines | 7 code | 8 blank | 28 comment | 0 complexity | ab7bf4bbefd26f8d71e328733c0423a8 MD5 | raw file
  1. '****************************** Module Header ******************************'
  2. ' Module Name: Win32.vb
  3. ' Project: VBWPFClipboardViewer
  4. ' Copyright (c) Microsoft Corporation.
  5. '
  6. ' The VBWPFClipboardViewer project provides the sample on how to monitor
  7. ' Windows clipboard changes in a WPF application.
  8. '
  9. ' This source is subject to the Microsoft Public License.
  10. ' See http://www.microsoft.com/opensource/licenses.mspx#Ms-PL.
  11. ' All other rights reserved.
  12. '
  13. ' THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
  14. ' EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
  15. ' WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
  16. '***************************************************************************'
  17. ''' <summary>
  18. ''' This module holds the Win32 function declarations and constants needed by
  19. ''' this sample application.
  20. ''' </summary>
  21. Friend Module Win32
  22. ''' <summary>
  23. ''' The WM_DRAWCLIPBOARD message notifies a clipboard viewer window that
  24. ''' the content of the clipboard has changed.
  25. ''' </summary>
  26. Friend Const WM_DRAWCLIPBOARD As Integer = &H308
  27. ''' <summary>
  28. ''' A clipboard viewer window receives the WM_CHANGECBCHAIN message when
  29. ''' another window is removing itself from the clipboard viewer chain.
  30. ''' </summary>
  31. Friend Const WM_CHANGECBCHAIN As Integer = &H30D
  32. Friend Declare Function SetClipboardViewer Lib "user32.dll" (ByVal hWndNewViewer As IntPtr) As IntPtr
  33. Friend Declare Function ChangeClipboardChain Lib "user32.dll" (ByVal hWndRemove As IntPtr, ByVal hWndNewNext As IntPtr) As Boolean
  34. Friend Declare Auto Function SendMessage Lib "user32.dll" (ByVal hWnd As IntPtr, ByVal Msg As Integer, ByVal wParam As IntPtr, ByVal lParam As IntPtr) As IntPtr
  35. End Module