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.
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.
__________________
Paulo Gomes - Porto, Portugal - Living/Working in France
Mobile Device: Samsung Galaxy S, Android 2.3.4 CUstom ROM
Laptop: Toshiba NB100-130 (running on Win7Ultimate)
My Posts helped you? Consider Buying me a Porto Glass!
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
Quote:
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
Quote:
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.
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?
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
Quote:
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.
Quote:
3) I assign an image to an image button. Will the image fill the whole button or not?
The whole button will be filled.
Quote:
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.
Quote:
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.
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.
You must just be aware that when compiling with AutoScale the exe file runs well on both devices QVGA and VGA.
If you set the screen size to 480 * 800 your program will run only on EVGA devices.
If you want crisp images and the benefits of AutoScale you can use NativeImage and NativeFormImage from http://www.basic4ppc.com/forum/addit...html#post10811. The help contains a detailed explanation of what AutoScale does.
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.