Sub Process_Globals
Private fx As JFX
Private MainForm As Form
Dim nh As NativeHook
End Sub
Sub AppStart (Form1 As Form, Args() As String)
nh.Initialize("nh", Me).startNativeMouseInputListener '<-----DON'T FORGET TO UNREGISTER NH WHEN DONE!!!!
MainForm = Form1
MainForm.SetFormStyle("UNIFIED")
MainForm.RootPane.LoadLayout("Layout1") 'Load the layout file.
MainForm.Show
End Sub
'This will be raised whenever there's a MouseClicked event.
'This doesn't run in the Main Thread.
'Use the Threading library's thread.RunOnGuiThread() if you need to access the UI from this sub.
Sub nh_NativeMouseClicked(nme As NativeMouseEvent) As Boolean
Log($"nh_NativeMouseClicked(X:${nme.X},Y:${nme.Y},ClickCount:${nme.ClickCount},Button${nme.MouseButton})"$)
Return False 'Not consuming the event.
End Sub