ZooFlow: Remove ClassWin32, replace with Modules.Windows

This commit is contained in:
Jonathan Jenne
2021-10-26 11:29:11 +02:00
parent 2b6e06c3fa
commit 0197835eee
5 changed files with 42 additions and 126 deletions

View File

@@ -1,4 +1,5 @@
Imports System.Runtime.InteropServices
Imports DigitalData.Modules.Windows
Namespace ClipboardWatcher
Public Class Watcher
@@ -12,12 +13,12 @@ Namespace ClipboardWatcher
Private Sub New()
MyBase.CreateHandle(New CreateParams)
_Handle = ClassWin32.SetClipboardViewer(Handle)
_Handle = NativeMethods.SetClipboardViewer(Handle)
End Sub
Protected Overrides Sub WndProc(ByRef m As Message)
Select Case m.Msg
Case ClassWin32.WM_DRAWCLIPBOARD
Case NativeMethods.WM_DRAWCLIPBOARD
Dim oData As IDataObject = Clipboard.GetDataObject
RaiseEvent ClipboardChanged(Me, oData)
End Select
@@ -38,7 +39,7 @@ Namespace ClipboardWatcher
' aufgerufen werden
End If
MyBase.DestroyHandle()
Dim H As IntPtr = ClassWin32.SetClipboardViewer(_Handle)
Dim H As IntPtr = NativeMethods.SetClipboardViewer(_Handle)
End If
_DisposedValue = True
End Sub