Sub Process_Globals
Private fx As JFX
Private MainForm As Form
Private ox, oy As Double
End Sub
Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
MainForm.SetFormStyle("TRANSPARENT")
MainForm.RootPane.LoadLayout("1")
MainForm.Show
MainForm.BackColor = fx.Colors.ARGB(50, 255, 0, 0)
CSSUtils.SetBackgroundColor(MainForm.RootPane, fx.Colors.Transparent) 'can also be set with the designer
End Sub
Sub MainForm_MousePressed (EventData As MouseEvent)
ox = EventData.X
oy = EventData.Y
End Sub
Sub MainForm_MouseDragged (EventData As MouseEvent)
Dim jo As JavaObject = EventData
MainForm.WindowLeft = jo.RunMethod("getScreenX", Null) - ox
MainForm.WindowTop = jo.RunMethod("getScreenY", Null) - oy
End Sub