Developping for a PDA with 480 * 800 screen

HARRY

Active Member
Licensed User
Longtime User
Hi,

I intend to buy a HTC PDA with a screen resolution of 480 * 800. The aspect ratio is :6: 10 i.s.o. 3:4. I want to use the whole screen in my applications and I wonder how to use Basic4PPC in this case.

A few questions:

1) For the time being I think I should proceed as follows:

Set in the PC IDE the screen size to 400 *240, landscape.

Lay out in the IDE the controls as wanted.

Compile with auto scale.

I assume that scaling the height is independent from scaling the width.

The control in the IDE with W=80, H=20, L=240, T= 100 is displayed on the device with W= 200, H=40, L=600, T=200

Is that correct?

2) In my programs I make use of adding controls ( buttons, tables and image controls) at runtime.

These added controls, are they auto scaled also? Some of those added controls should keep ( or end up) the aspect ratio 4:3.

3) What happens with icons, will they be distorted?

Does somebody have experience with handling these display sizes? Of course I could verify my assumptions myuself, but I don't have the device, yet.

Harry
 

Cableguy

Expert
Licensed User
Longtime User
From my experience with my QTEK9000, wich has a 48ox640 screen, BEFORE auto-scale was introduced but opti-compile was available, I used to develop in the desktop, setting my screen to the correct dimensions, and placing all controls and such in the correct places I wanted to them to show, and all workd fine...
All controls apeared in the correct places, BUT I needed to be carefull with the Fonts size,as they were a bit tricky...

So my sugestion to you is, if your main target is the 400x800 screen devices then DO NOT auto scale, layout the Form in full size and place/dim the controls exactly as you want them to apear...
Again, Font size may be an issue, even with auto-scale.
 

klaus

Expert
Licensed User
Longtime User
1) For the time being I think I should proceed as follows:
Set in the PC IDE the screen size to 400 *240, landscape.
Lay out in the IDE the controls as wanted.
Compile with auto scale.

Yes

I assume that scaling the height is independent from scaling the width.
The control in the IDE with W=80, H=20, L=240, T= 100 is displayed on the device with W= 200, H=40, L=600, T=200
Is that correct?

No ! ScreenScaleX=2 and ScreenScaleY=2 there is NO stretching

The control in the IDE with W=80, H=20, L=240, T= 100 is displayed on the device with W= 160, H=40, L=480, T=200

2) In my programs I make use of adding controls ( buttons, tables and image controls) at runtime.

These added controls, are they auto scaled also? Some of those added controls should keep ( or end up) the aspect ratio 4:3.

The controls added at runtime are also AutoScaled, the ratio remains 4:3

With AutoScale there are no problems with Fonts.

The difference between the 480/640 and 480/800 screen size is that in the second one you have more space (160 pixels) to place controls. The pixels are still square.

If you compile with AutoScale, you set the controls on the screen with the 240/320 or 240/400 resolution and on the device display positions and sizes are doubled and the dislay looks like the QVGA display.

If you want to take advantage of the higher resolution you must set the screen size in the IDE to 480/640 or 480/800, place your controls as you want them but double size.
The only problem is that on the desktop IDE the fonts are smaller, half size.

Best regards.
 

HARRY

Active Member
Licensed User
Longtime User
Hallo Cableguy and Klaus,

Thanks for your helpfull replies. Yet, I still have a few questions.

1) When Auto Scale is used, all references to pixels in the code are doubled, e.g. length and width used in the image library, radius in a circle, column width in a table, etc. Is that correct?

2) I define a bitmap in the code of 40 * 40, which is blown up using Auto Scale to 80 * 80. When I read a image file of 40 * 40 into that bitmap, what happens? Does it fill 1/4 of the bitmap or the whole bitmap?

3) I assign an image to an image button. Will the image fill the whole button or not?

4) With 'taking advantage' you just mean have better picture quality or are there more advantages?

5) When I change via Tools the form width and height to 800 * 480, the form width and height indicated on the right side still are 240 * 264. Are these different things?

Harry
 

klaus

Expert
Licensed User
Longtime User
Answers to your questions:

1) When Auto Scale is used, all references to pixels in the code are doubled, e.g. length and width used in the image library, radius in a circle, column width in a table, etc. Is that correct?
Yes, the program acts as the screen size were QVGA

2) I define a bitmap in the code of 40 * 40, which is blown up using Auto Scale to 80 * 80. When I read a image file of 40 * 40 into that bitmap, what happens? Does it fill 1/4 of the bitmap or the whole bitmap?
The 40 * 40 pixel image will be stretched up to 80 * 80 pixels.

3) I assign an image to an image button. Will the image fill the whole button or not?
The whole button will be filled.

4) With 'taking advantage' you just mean have better picture quality or are there more advantages?
Better image quality. With AutoScale, as stated in point 1, the program acts as if the screen size were QVGA.
The better image quality has also it's side effects that is occupied memory which is 4 times more in VGA than in QVGA.

5) When I change via Tools the form width and height to 800 * 480, the form width and height indicated on the right side still are 240 * 264. Are these different things?
This seems beeing an error in the IDE, I had never noticed that.
When you place controls onto the form the coordinates are correct.

Attached 2 images:
240 * 400 AutoScale compiled ImageButton 17 * 17 Image 120 * 161
480 * 800 Normal compiled 34 * 34 Image 240 * 322

Best regards.
 

Attachments

  • Screen240_400.JPG
    Screen240_400.JPG
    27 KB · Views: 229
  • Screen480_800.JPG
    Screen480_800.JPG
    30.4 KB · Views: 220

HARRY

Active Member
Licensed User
Longtime User
Hallo Klaus,

Thanks for the additional information. The pictures you have attached are convincing. I will change the form size to 800 * 480 and compile without Auto Scale. I think that the easiest way to adapt my programs is to edit the .spb files using wordpad. That goes much quicker than via the IDE.

Regards,

Harry
 

konisek

Member
Licensed User
Longtime User
My PDA form shows 240x268 before autoscale.
Actually it covers 480x536 area.

What is the actual app's screen size on PDA/HTC (480x800)?

Is it actually 480x696, i.e. should I create a form of size 240x348 with autoscale?
 
Top