DesktopWindow.Maximize
From Xojo Documentation
Method
Maximizes the window if it is not already maximized and calls the Maximized event. If the window was already maximized when you call this method, then it is restored to its prior state and calls the Restored event.
Notes
If the window is not visible when Maximize is called, it becomes visible.