ZooFlow: fix key events
This commit is contained in:
parent
0f1b0d3e30
commit
81b62dd483
@ -43,22 +43,8 @@ Public Class frmFlowForm
|
|||||||
SetFormLocation()
|
SetFormLocation()
|
||||||
SetFormState(OnFlowFormStateChangedEvent.FlowFormState.Default)
|
SetFormState(OnFlowFormStateChangedEvent.FlowFormState.Default)
|
||||||
|
|
||||||
' === Register Events ===
|
|
||||||
|
|
||||||
AddHandler MouseClick, New MouseEventHandler(AddressOf Form_MouseClick)
|
|
||||||
AddHandler MouseMove, New MouseEventHandler(AddressOf Form_MouseMove)
|
|
||||||
AddHandler KeyUp, New KeyEventHandler(AddressOf Form_KeyUp)
|
|
||||||
|
|
||||||
' === Register As Event Listener ===
|
' === Register As Event Listener ===
|
||||||
EventBus.Instance.Register(Me)
|
EventBus.Instance.Register(Me)
|
||||||
|
|
||||||
' === TESTING Actions ===
|
|
||||||
Dim oButton As New Button With {
|
|
||||||
.Location = New Point(10, 10),
|
|
||||||
.Size = New Size(10, 10),
|
|
||||||
.Text = "yes"
|
|
||||||
}
|
|
||||||
Controls.Add(oButton)
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub frmFlowForm_Closed(sender As Object, e As EventArgs) Handles Me.Closed
|
Private Sub frmFlowForm_Closed(sender As Object, e As EventArgs) Handles Me.Closed
|
||||||
@ -69,7 +55,7 @@ Public Class frmFlowForm
|
|||||||
End Try
|
End Try
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub Form_MouseClick(sender As Object, ByVal e As MouseEventArgs)
|
Private Sub Form_MouseClick(sender As Object, ByVal e As MouseEventArgs) Handles Me.MouseClick
|
||||||
If e.Button = MouseButtons.Right Then
|
If e.Button = MouseButtons.Right Then
|
||||||
ContextMenuStrip1.Show(Cursor.Position)
|
ContextMenuStrip1.Show(Cursor.Position)
|
||||||
Else
|
Else
|
||||||
@ -81,14 +67,14 @@ Public Class frmFlowForm
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub Form_MouseMove(ByVal sender As Object, ByVal e As MouseEventArgs)
|
Private Sub Form_MouseMove(ByVal sender As Object, ByVal e As MouseEventArgs) Handles Me.MouseMove
|
||||||
If e.Button = MouseButtons.Left Then
|
If e.Button = MouseButtons.Left Then
|
||||||
ClassWin32.ReleaseCapture()
|
ClassWin32.ReleaseCapture()
|
||||||
ClassWin32.SendMessage(Handle, ClassWin32.WM_NCLBUTTONDOWN, ClassWin32.HTCAPTION, 0)
|
ClassWin32.SendMessage(Handle, ClassWin32.WM_NCLBUTTONDOWN, ClassWin32.HTCAPTION, 0)
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub Form_KeyUp(ByVal sender As Object, ByVal e As KeyEventArgs)
|
Private Sub Form_KeyDown(ByVal sender As Object, ByVal e As KeyEventArgs) Handles Me.KeyDown
|
||||||
If e.KeyCode = Keys.Escape Then
|
If e.KeyCode = Keys.Escape Then
|
||||||
If ESCHitCount > 0 Then
|
If ESCHitCount > 0 Then
|
||||||
Dim result As DialogResult = MessageBox.Show("Exit Zooflow", "Please Varify", MessageBoxButtons.YesNo)
|
Dim result As DialogResult = MessageBox.Show("Exit Zooflow", "Please Varify", MessageBoxButtons.YesNo)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user