B4J Question FullScreen Setting

marco.canta

Active Member
Licensed User
Longtime User
Hello, I'm making a program when it is running must be full screen.
To set the fullscreen I have no problems, but I do not know how to set the "MainForm" or another to make sure that you do not see the toolbar in Windows or Linux.
Thank you

Marco
 

marco.canta

Active Member
Licensed User
Longtime User
Hello LucaMs, the property "undecorated" I used in Java and works perfectly, but I do not B4J to the same result.
He removed the window frame, but remains in the foreground the toolbar Win / Linux.
 
Upvote 0

LucaMs

Expert
Licensed User
Longtime User
but remains in the foreground the toolbar Win / Linux.
Do you really mean "in foreground" or "available"?
Are you referring to this, right?
upload_2015-12-26_18-31-53.png



This simple code works for me:
B4X:
    MainForm.SetFormStyle("UNDECORATED")
MainForm.WindowLeft = 0
MainForm.WindowTop = 0
MainForm.WindowWidth = 1366
MainForm.WindowHeight = 768
 
Last edited:
Upvote 0

marco.canta

Active Member
Licensed User
Longtime User
Your code with the values of the resolution my monitor works.
My code did not work because I noted the resolution monitor with "fx.PrimaryScreen.MaxX" and "fx.PrimaryScreen.MaxY", but the value MaxY is always a little smaller than the real one.

My monitor is 1280x800, but I function detects 1280x768. Why ???

Thank you
Marco
 
Upvote 0

marco.canta

Active Member
Licensed User
Longtime User
Hello, I tried your suggestion, but it is not working.
By the time I found this solution, but I do not like.

B4X:
   MainForm.WindowWidth = fx.PrimaryScreen.MaxY + (fx.PrimaryScreen.MaxY*5)/100
   MainForm.WindowHeight = fx.PrimaryScreen.MaxX

I would love to find the right method.
 
Upvote 0
Top