Sub MaxScreen
Dim jo As JavaObject
jo.InitializeStatic("java.awt.Toolkit")
Dim toolkit As JavaObject = jo.RunMethod("getDefaultToolkit", Null)
Dim RS = toolkit.RunMethod("getScreenSize", Null) As String
Dim Width, Height As Int
Width = RS.SubString2( RS.IndexOf("width=")+6, RS.IndexOf(","))
Height = RS.SubString2( RS.IndexOf("height=")+7, RS.IndexOf("]"))
MainForm.WindowWidth = Width
MainForm.WindowHeight = Height
MainForm.WindowTop = 0
MainForm.WindowLeft = 0
End Sub