'Static code module
Sub Process_Globals
Public DisplayForm As Form
Private ox, oy As Double
End Sub
Public Sub Show
If DisplayForm.IsInitialized = False Then
DisplayForm.Initialize("DisplayForm", 1366, 768)
DisplayForm.RootPane.LoadLayout("Form1")
DisplayForm.SetFormStyle("UNDECORATED")
DisplayForm.Title = Main.title & " - Display"
DisplayForm.Icon = Main.fx.LoadImage(File.DirAssets,"monitor.gif")
DisplayForm.WindowWidth = Main.fx.PrimaryScreen.MaxX - Main.fx.PrimaryScreen.MinX
DisplayForm.WindowLeft = Main.fx.PrimaryScreen.MinX
DisplayForm.WindowHeight = Main.fx.PrimaryScreen.MaxY - Main.fx.PrimaryScreen.MinY
DisplayForm.WindowTop = Main.fx.PrimaryScreen.MinY
Dim jmf As JavaObject = DisplayForm
Dim stage As JavaObject = jmf.GetField("stage")
stage.RunMethod("setFullScreen", Array As Object(True))
DisplayForm.Show
End If
End Sub
Private Sub DisplayForm_CloseRequest (EventData As Event)
Main.MainForm.Close
End Sub
Sub DisplayForm_MousePressed (EventData As MouseEvent)
ox = EventData.X
oy = EventData.Y
End Sub
Sub DisplayForm_MouseDragged (EventData As MouseEvent)
Dim jo As JavaObject = EventData
DisplayForm.WindowLeft = jo.RunMethod("getScreenX", Null) - ox
DisplayForm.WindowTop = jo.RunMethod("getScreenY", Null) - oy
End Sub