View Single Post
  #2 (permalink)  
Old 02-14-2009, 08:03 AM
klaus's Avatar
klaus klaus is offline
Basic4ppc Expert
 
Join Date: Oct 2007
Location: Fully, Switzerland
Posts: 3,813
Awards Showcase
Forum Contributer Beta Tester Competition Winner 
Total Awards: 3
Default

Till now I have only written programs for QVGA screens and added Fillipo's routine 'ChangeToVGA' to support VGA screens.

Answers to your questions:

1) The programing becomes a little bit more complicated because of the handling of the different screen sizes. From QVGA to VGA it's easy because the width-height ratio is the same and there is just the scale factor of 2. In that case all the Top, Left, Width and Height values are multiplied by the scale factor.

2) The change for screens with different width-height ratios it becomes more complicated.
For example:
-From 240/320 to 240/400 the lower part of the screen will be blank, or you should multiply all Height parameters of the controls by 400/320=1.25 to change their spacing.
-From 240/320 to 320/320 you could stretch the screen horizontally by multiplying all the Left and Width paramters of the controls by 320/240=1.33 otherwise the right third of the screen will be blank.

3) The same reasoning applyes here.
- From 320/320 to 240/320 you will miss the right third of the screen or you must shrink the screen width by 240/320=0.67 (same principle as stretching) with the risk that some controls are too small or you must foresee the control sizes to fit into a 240 pixel width.
- From 240/400 to 240/320 you will miss the lower 80 pixels or shrink the screen vertically.

Or you have a different source code for each screen size, which is also not that convenient.

Best regards.
__________________
Klaus
Switzerland
Reply With Quote