PageRenderTime 11ms CodeModel.GetById 1ms app.highlight 5ms RepoModel.GetById 2ms 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
18
19''' <summary>
20''' This module holds the Win32 function declarations and constants needed by
21''' this sample application.
22''' </summary>
23Friend Module Win32
24
25    ''' <summary>
26    ''' The WM_DRAWCLIPBOARD message notifies a clipboard viewer window that 
27    ''' the content of the clipboard has changed. 
28    ''' </summary>
29    Friend Const WM_DRAWCLIPBOARD As Integer = &H308
30
31    ''' <summary>
32    ''' A clipboard viewer window receives the WM_CHANGECBCHAIN message when 
33    ''' another window is removing itself from the clipboard viewer chain.
34    ''' </summary>
35    Friend Const WM_CHANGECBCHAIN As Integer = &H30D
36
37    Friend Declare Function SetClipboardViewer Lib "user32.dll" (ByVal hWndNewViewer As IntPtr) As IntPtr
38
39    Friend Declare Function ChangeClipboardChain Lib "user32.dll" (ByVal hWndRemove As IntPtr, ByVal hWndNewNext As IntPtr) As Boolean
40
41    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
42
43End Module