FullScreen and getting screen size

glook

Member
Licensed User
When using FullScreen from FormLib.dll, how is it possible to determine the actual usable screen size? I would like to resize an Image control to the maximum available.

Perhaps I have misunderstood something? I thought that Form.Width and Form.Height would always give the screen dimensions, but they do not change after invoking FullScreen!

The menu and title bars are removed, as expected. I used MsgBox to check the
form dimensions before and after - they are always 240x188. However it is possible to display the Image control with a "forced" height of more than 188.

Geoff.
 

RandomCoder

Well-Known Member
Licensed User
If you remove both the title bar and the menu bar then the screen size should be 240x320.
There is no problem with setting the Image size to more than 188.
Erel, I've just been playing with this to see if I could get it to work.
I thought that a simple Form refresh would do the trick but still my message box reports the same screen size as before making the screen fullsize.
Why does Form.Height not change?

Regards,
RandomCoder.
 

RandomCoder

Well-Known Member
Licensed User
Thanks Erel, I thought that I must have been doing something wrong - it wouldn't have been the first time ;)

Regards,
RandomCoder
 

glook

Member
Licensed User
Thanks for the responses.

I had also previously tried Form.Refresh, but no change. I know my test device is 240x240, but need to cater for different sizes.

I'll look forward to a future fix - it will be a while until the rest of my project is finished anyway! That is no reflection on B4ppc though - it's quick to code and I think it's a fantastic product :)

Geoff.
 

corwin42

Expert
Licensed User
It will be fixed in the next version.
I'm pushing this thread to the top because it seems that this problem still isn't fixed in 6.80.

I turn off the title of a form with flb.FullScreen2(False, True). The Form.Height property does not change after this.

Is there another way to calculate the exact size of the real form height?

Thanks,
Markus
 

klaus

Expert
Licensed User
You can get the values with the Door library.
B4X:
[SIZE=2][FONT=Courier New][SIZE=2][FONT=Courier New]obj.New1([/FONT][/SIZE][/FONT][/SIZE][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080]False[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2])[/SIZE][/FONT]
[SIZE=2][FONT=Courier New]obj.FromControl([/FONT][/SIZE][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800000][FONT=Courier New][SIZE=2][COLOR=#800000][FONT=Courier New][SIZE=2][COLOR=#800000]"frmMain"[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2])[/SIZE][/FONT]
[/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800000][FONT=Courier New][SIZE=2][COLOR=#800000][FONT=Courier New][SIZE=2][COLOR=#800000][COLOR=black]Height =[/COLOR] [/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2]obj.GetProperty([/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800000][FONT=Courier New][SIZE=2][COLOR=#800000][FONT=Courier New][SIZE=2][COLOR=#800000]"Height"[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2])[/SIZE][/FONT]
[/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2][COLOR=black]Width = [/COLOR][/SIZE][/FONT][/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2][COLOR=black]obj[/COLOR].GetProperty([/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800000][FONT=Courier New][SIZE=2][COLOR=#800000][FONT=Courier New][SIZE=2][COLOR=#800000]"Width"[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2])[/SIZE][/FONT][/SIZE][/FONT]
Attached a small test program.

Best regards.
 

Attachments

Top