ZooFlow: add drag drop
This commit is contained in:
@@ -1,17 +1,71 @@
|
||||
Public Class frmFlowForm_Test1
|
||||
''' <summary>
|
||||
''' Make button with rounded borders by custom painting the background
|
||||
''' </summary>
|
||||
Imports DigitalData.Modules.Logging
|
||||
|
||||
Private Sub frmFlowForm_Test1_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
Opacity = 0.2
|
||||
Public Class frmFlowForm_Test1
|
||||
Private Const OPACITY_HIDDEN = 0.2
|
||||
Private Const OPACITY_SHOWN = 1
|
||||
|
||||
Private ActiveModules As List(Of String)
|
||||
Private Logger As Logger
|
||||
|
||||
Private ESCHitCount As Integer = 0
|
||||
|
||||
Public Event ClipboardChanged As EventHandler(Of IDataObject)
|
||||
|
||||
Private Sub frmFlowForm_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
' === Initialize Logger ===
|
||||
Logger = My.LogConfig.GetLogger()
|
||||
|
||||
' === Set Form Properties ===
|
||||
TopMost = True
|
||||
AllowDrop = True
|
||||
ShowInTaskbar = False
|
||||
Opacity = OPACITY_HIDDEN
|
||||
SetFormLocation()
|
||||
|
||||
AddHandler KeyDown, AddressOf frmFlowForm_KeyDown
|
||||
AddHandler KeyUp, AddressOf frmFlowForm_KeyDown
|
||||
End Sub
|
||||
|
||||
Private Sub frmFlowForm_Test1_MouseLeave(sender As Object, e As EventArgs) Handles Me.MouseLeave
|
||||
Opacity = 0.2
|
||||
Public Sub SetFormLocation()
|
||||
Location = My.UIConfig.FlowForm.Location
|
||||
End Sub
|
||||
|
||||
Private Sub frmFlowForm_Test1_MouseHover(sender As Object, e As EventArgs) Handles Me.MouseHover
|
||||
Opacity = 1
|
||||
Private Sub frmFlowForm_MouseLeave(sender As Object, e As EventArgs) Handles Me.MouseLeave
|
||||
Opacity = OPACITY_HIDDEN
|
||||
End Sub
|
||||
|
||||
Private Sub frmFlowForm_MouseHover(sender As Object, e As EventArgs) Handles Me.MouseHover
|
||||
Opacity = OPACITY_SHOWN
|
||||
End Sub
|
||||
|
||||
Private Sub frmFlowForm_MouseMove(ByVal sender As Object, ByVal e As MouseEventArgs) Handles Me.MouseMove
|
||||
If e.Button = MouseButtons.Left Then
|
||||
ClassWin32.ReleaseCapture()
|
||||
ClassWin32.SendMessage(Handle, ClassWin32.WM_NCLBUTTONDOWN, ClassWin32.HTCAPTION, 0)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub frmFlowForm_KeyDown(ByVal sender As Object, ByVal e As KeyEventArgs)
|
||||
If e.KeyCode = Keys.Escape Then
|
||||
If ESCHitCount > 0 Then
|
||||
Dim oResult As DialogResult = MessageBox.Show("Exit Zooflow", "Please Varify", MessageBoxButtons.YesNo)
|
||||
If oResult = DialogResult.Yes Then
|
||||
' Save Settings
|
||||
My.UIConfig.FlowForm.Location = Location
|
||||
My.UIConfigManager.Save()
|
||||
|
||||
' Exit
|
||||
Application.Exit()
|
||||
Else
|
||||
ESCHitCount = 0
|
||||
End If
|
||||
Else
|
||||
ESCHitCount += 1
|
||||
End If
|
||||
ElseIf e.KeyCode = Keys.D AndAlso (e.Control) Then
|
||||
If ActiveModules.Contains(ClassConstants.MODULE_ZOOFLOW) Then
|
||||
MsgBox("Search")
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user