add ZooFlow, Clipboard Watcher Migration
This commit is contained in:
50
ZooFlow/frmFlowForm.vb
Normal file
50
ZooFlow/frmFlowForm.vb
Normal file
@@ -0,0 +1,50 @@
|
||||
Public Class frmFlowForm
|
||||
Private WithEvents Watcher As ClassClipboardWatcher = ClassClipboardWatcher.Singleton
|
||||
|
||||
Public Event ClipboardChanged As EventHandler(Of IDataObject)
|
||||
|
||||
Private Sub frmFlowForm_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
AllowDrop = True
|
||||
|
||||
SetBitmap(My.Resources.CW_wartet_klein)
|
||||
End Sub
|
||||
|
||||
Private Sub frmFlowForm_DragOver(sender As Object, e As DragEventArgs) Handles Me.DragOver
|
||||
If e.Data.GetDataPresent(DataFormats.FileDrop) Then
|
||||
' Handle file dragged from Windows
|
||||
e.Effect = DragDropEffects.Copy
|
||||
SetBitmap(My.Resources.CW_hatwas_klein)
|
||||
ElseIf e.Data.GetDataPresent("FileGroupDescriptor") Then
|
||||
' Handle a message dragged from Outlook
|
||||
e.Effect = DragDropEffects.Copy
|
||||
SetBitmap(My.Resources.CW_hatwas_klein)
|
||||
ElseIf e.Data.GetDataPresent("aryFileGroupDescriptor") AndAlso (e.Data.GetDataPresent("FileContents")) Then
|
||||
' Handle a message dragged from Thunderbird?
|
||||
e.Effect = DragDropEffects.Copy
|
||||
SetBitmap(My.Resources.CW_hatwas_klein)
|
||||
Else
|
||||
' Otherwise, do not handle
|
||||
e.Effect = DragDropEffects.None
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub frmFlowForm_DragLeave(sender As Object, e As EventArgs) Handles Me.DragLeave
|
||||
SetBitmap(My.Resources.CW_wartet_klein)
|
||||
End Sub
|
||||
|
||||
Private Sub Watcher_ClipboardChanged(sender As Object, e As IDataObject) Handles Watcher.ClipboardChanged
|
||||
RaiseEvent ClipboardChanged(sender, e)
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' DragDrop Support
|
||||
''' </summary>
|
||||
Protected Overrides Sub WndProc(ByRef m As Message)
|
||||
If m.Msg = &H84 Then
|
||||
m.Result = CType(2, IntPtr)
|
||||
Return
|
||||
End If
|
||||
|
||||
MyBase.WndProc(m)
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user