Emulator on desktop

bdiscount

Active Member
Licensed User
When I use the desktop the screen is smaller and all controls are covered on bottom and right side. The same program on the device is perfect. IS it my pc or what.
 

agraham

Expert
Licensed User
Longtime User
Sorry Erel but it is more than "slightly incorrect (1-2 pixels)"

With a nominal form size of 240 x 264 there are much larger inconsistences with reported and actual client area sizes.

Under Vista

Form1.Width reports 238 : Form1.Height returns 268
Actual Client area width is 229 : Actual Client area height is 266

So this is 11 pixels narrower and 2 pixel higher than nominal and the form properties reflect neither the nominal nor the actual sizes.

Under XP

Form1.Width reports 238 : Form1.Height returns 268
Actual Client area width is 237 : Actual Client area height is 275

So this is 1 pixels narrower and 7 pixels higher than nominal and the form properties also reflect neither the nominal nor the actual sizes.

XP & Vista

The actual Form Designer boundaries are 237 x 267 (excluding the red border) or 239 x 269 (including the red border)
 

agraham

Expert
Licensed User
Longtime User
Screen captures included showing the client area sizes as quoted above.
 

Attachments

  • XPform.jpg
    XPform.jpg
    5.1 KB · Views: 228
  • VistaForm.jpg
    VistaForm.jpg
    5.6 KB · Views: 200

Cableguy

Expert
Licensed User
Longtime User
I maybe a bit off in this, but the topic's name refer an emulator...
The sicussion is, as I understand it, about the fact that the designer screen is diferent in the device as in the desktop (correct me if I'm wrong)...

Yes, as im most cases the desktop behaves diferently than the device....

I've never had problems regarding placing the controls visualy in either platforms, but I came to realize that it is more secure to place them in code...

If you set the screen resolution to the same as in the device, you still get some diferences in the sizes in some controls like combobox and srollbars...

The problem is, although Basic4ppc is a "cross platform" ( as I call it ), it was primarely created to work in the device, withe the extra ability to code in the desktop....
Except for some special cases, I start by placing the controls in the device and then, when the coding begins to height on battery time, I turn to the desktop... This for me has been the best practice...

I also always keep in mind that, since the native control in Basic4ppc are double pixeled, they might show differently in diferent screen resolutions in the desktop, but still maintain their ratio....

So for me, yes this is an anoyance, but there are few, not that many, other things that complicate our coding than this litle thing...
 

agraham

Expert
Licensed User
Longtime User
A query for Erel.

I uploaded the two screen captures above as PNGs to keep them pixel accurate but they have appeared as JPGs! Does the forum software do an automatic conversion?

I notice that the external dimensions of both captures are the same 245 x 302 but the client areas are different. I suppose that you are taking the nominal size of 240 x 264 and adding some allowance for the frame - although why an odd number for the width I cannot guess - and setting the form height and width. Why not use the ClientSize property of the form to size it correctly?
 

Attachments

  • DesktopForms.zip
    8.9 KB · Views: 186

Erel

B4X founder
Staff member
Licensed User
Longtime User
In fact ClientSize is used on the desktop.
The problem is that MinimumSize and MaximumSize are also set to disallow resizing of the form (by the user).
Setting these values causes the frame size to affect the actual size.
Version 5.8 is soon to come and I will further check this issue.

I don't know about the forum JPG conversion but it sounds like a good idea in order to save some space.
 

bdiscount

Active Member
Licensed User
I do most of my coding on the device. I do most of the design on the desktop so I can place controls corectly. Which doesn't look right on the desktop but good on the device. I do use the 239x268 size. The desktop is just a minor annoyance. I would rather see top,left,width and height on the device Then I would do it all on device. I am in no hurry to code as all my coding is just a challenge which I seem to be running out of now.:sign0188:
 
Top