Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Questions (Windows Mobile)
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Questions (Windows Mobile) Post any question regarding Basic4ppc.

Developping for a PDA with 480 * 800 screen

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-17-2009, 02:08 PM
Basic4ppc Veteran
 
Join Date: Apr 2007
Location: Netherlands
Posts: 222
Default Developping for a PDA with 480 * 800 screen

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
Reply With Quote
  #2 (permalink)  
Old 10-17-2009, 02:36 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 2,344
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

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!
Reply With Quote
  #3 (permalink)  
Old 10-17-2009, 03:22 PM
klaus's Avatar
Basic4ppc Expert
 
Join Date: Oct 2007
Location: Fully, Switzerland
Posts: 4,463
Awards Showcase
Forum Contributer Beta Tester Competition Winner 
Total Awards: 3
Default

Quote:
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.

Best regards.
__________________
Klaus
Switzerland

Beginner's Guide / User's Guide
Reply With Quote
  #4 (permalink)  
Old 10-18-2009, 11:45 AM
Basic4ppc Veteran
 
Join Date: Apr 2007
Location: Netherlands
Posts: 222
Default

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
Reply With Quote
  #5 (permalink)  
Old 10-18-2009, 01:01 PM
klaus's Avatar
Basic4ppc Expert
 
Join Date: Oct 2007
Location: Fully, Switzerland
Posts: 4,463
Awards Showcase
Forum Contributer Beta Tester Competition Winner 
Total Awards: 3
Default

Answers to your questions:

Quote:
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.

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

Best regards.
Attached Images
File Type: jpg Screen240_400.JPG (27.0 KB, 59 views)
File Type: jpg Screen480_800.JPG (30.4 KB, 53 views)
__________________
Klaus
Switzerland

Beginner's Guide / User's Guide
Reply With Quote
  #6 (permalink)  
Old 10-18-2009, 02:39 PM
Basic4ppc Veteran
 
Join Date: Apr 2007
Location: Netherlands
Posts: 222
Default

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
Reply With Quote
  #7 (permalink)  
Old 10-18-2009, 04:45 PM
klaus's Avatar
Basic4ppc Expert
 
Join Date: Oct 2007
Location: Fully, Switzerland
Posts: 4,463
Awards Showcase
Forum Contributer Beta Tester Competition Winner 
Total Awards: 3
Default

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.

Best regards.
__________________
Klaus
Switzerland

Beginner's Guide / User's Guide
Reply With Quote
  #8 (permalink)  
Old 10-18-2009, 05:40 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

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.
Reply With Quote
  #9 (permalink)  
Old 03-13-2010, 06:54 PM
konisek's Avatar
Knows the basics
 
Join Date: Jan 2009
Posts: 55
Default

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?
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Screen Capture App sahoopes Share Your Creations 5 10-06-2011 07:22 AM
Screen off joel2009 Questions (Windows Mobile) 11 05-15-2009 08:27 AM
Screen resolutions Cor Questions (Windows Mobile) 2 11-22-2008 05:02 PM
How to clear the screen ? gjoisa Questions (Windows Mobile) 1 03-11-2008 04:50 PM
Is there a way to keep the screen in the same location. XerVision Questions (Windows Mobile) 11 08-03-2007 12:46 AM


All times are GMT. The time now is 08:30 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0