Supporting multiple resolutions

Discussion in 'Basic4ppc Wishlist' started by davidmw, Jul 14, 2007.

  1. davidmw

    davidmw Member Licensed User

    It might be interesting to support multiple screen sizes and orientations with one program and not be forced to position controls in code.

    Compiled applications seem to be working pretty nicely on a CE5.x device but these often have unusual screen sizes.

    I'd like to create Form1 for a screen size like 640x480. Position and name all the controls and set font sizes, using the form editor.

    Then I'd like to 'clone' Form1 to target a different screen size. All the controls would keep the original names so no code changes are necessary. Perhaps there needs to be a way to map the Form1 identifer in code to the Form1_260x320 clone that is activated based on screen size.

    Form1_260x320 could be edited directly, the layout and fonts changed to fit the screen and it would just be swapped in at run time. Same thing would happen with orientation changes, just activate a different version of Form1.

    It should be possible to place additional controls on largers screens, or additional columns in tables, so we can use the space smartly. This could also make it easy to support virtual screen sizes with programs like Nyditot.
     
  2. mwaite

    mwaite Member Licensed User

    I agree wholeheartedly.

    I have a program that supports both portrait and landscape for a 240x320 display. The effort to reposition everything from portrait to landscape was huge considering the number of objects I have hidden on the forms.

    Now someone has come to me with my app running on a 240x240 display and I'm terribly disheartened by the amount of work it's going to take to create a new supported screen size.
     
  3. RandomCoder

    RandomCoder Well-Known Member Licensed User

    To get around this problem I add and position most controls during run time.
    I often position one control relative to the Form.Height and Form.Width and then position all other controls relative to this.

    Regards,
    RandomCoder
     
Loading...