B4J Question How can I get app to open in full window?

chuck3e

Active Member
Licensed User
Longtime User
Whenever I execute my B4J apps they open in a shrunk window. I would rather they open in a full window without me having to click on the Window's "grow" button. I don't see anything in Scene Builder that specifies that setting so there must be a code command that will do it. Anyone know what that is?
-C
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
You can set the initial window size in the module attributes.

There isn't a simple way to maximize the window. You can imitate it with this code:
B4X:
Dim ps As Screen = fx.PrimaryScreen
MainForm.WindowLeft = ps.MinX
MainForm.WindowWidth = ps.MaxX - ps.MinX
MainForm.WindowTop = ps.MinY
MainForm.WindowHeight = ps.MaxY - ps.MinY
 
Upvote 0

chuck3e

Active Member
Licensed User
Longtime User
Erel,
Thanks for the reply. I was hoping to be able to open in full screen mode and then be able to click the shrink button later if I needed to. With this method you show here, it does work, and I see I can drag the edges to shrink the window, it's just that it's a little more inconvenient. I can live with this though. Thanks again.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…