locked
Making an application that is automatically fullscreen on both 240x320 and on 480x640 displays. RRS feed

  • Question

  • Hello,

    I am trying to make a fullscreen application which loads an xml file and parses it to create a menu. Background and button images were created with a resolution of 240x320 in mind.

    Fullscreen on this resolution is achieved by setting the window dimensions using the MoveWindow-function.

    Unfortunately, this way fullscreen on a 480x640 display is not possible because the menu would cover only one quarter of the screen. The rest shows the Windows Mobile desktop.

    The users shouldn't have to create and maintain a separate xml-file (and separate images) for each resolution.

    Is there a function to just scale the window content in its entirety depending on the resolution?

    Are there other ways to solve this problem?

     

    Thank you for your help :)

    Christian Schlager
    Friday, November 26, 2010 10:40 AM

Answers

  • On Fri, 26 Nov 2010 20:53:00 +0000, BobZ2 [MVP] wrote:

    On Fri, 26 Nov 2010 10:40:46 +0000, ChrisWhatever1980 wrote:

    Hello,

    I am trying to make a fullscreen application which loads an xml file and parses it to create a menu. Background and button images were created with a resolution of 240x320 in mind.

    Fullscreen on this resolution is achieved by setting the window dimensions using the MoveWindow-function.

    Unfortunately, this way fullscreen on a 480x640 display is not possible because the menu would cover only one quarter of the screen. The rest shows the Windows Mobile desktop.

    You might check the SHInitDialog and SHFullscreen functions.


    The users shouldn't have to create and maintain a separate xml-file (and separate images) for each resolution.

    Is there a function to just scale the window content in its entirety depending on the resolution?

    I don't know any way to automatically scale a window and controls in it.

    I meant to add, that you can certainly check the screen size, and write code to resize
    your main window and then resize and position all its controls.


    Are there other ways to solve this problem?

     

    Thank you for your help :)Christian Schlager

    Saturday, November 27, 2010 9:05 PM
  • Hi,

    You might consider to make your application resolution aware in terms of the way following article introduced:

    http://msdn.microsoft.com/en-us/library/ms838275.aspx

    Thanks

    Binze


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    • Marked as answer by Bin-ze Zhao Thursday, December 2, 2010 3:13 AM
    Tuesday, November 30, 2010 7:54 AM

All replies

  • On Fri, 26 Nov 2010 10:40:46 +0000, ChrisWhatever1980 wrote:

    Hello,

    I am trying to make a fullscreen application which loads an xml file and parses it to create a menu. Background and button images were created with a resolution of 240x320 in mind.

    Fullscreen on this resolution is achieved by setting the window dimensions using the MoveWindow-function.

    Unfortunately, this way fullscreen on a 480x640 display is not possible because the menu would cover only one quarter of the screen. The rest shows the Windows Mobile desktop.

    You might check the SHInitDialog and SHFullscreen functions.


    The users shouldn't have to create and maintain a separate xml-file (and separate images) for each resolution.

    Is there a function to just scale the window content in its entirety depending on the resolution?

    I don't know any way to automatically scale a window and controls in it.


    Are there other ways to solve this problem?

     

    Thank you for your help :)Christian Schlager

    Friday, November 26, 2010 8:53 PM
  • On Fri, 26 Nov 2010 20:53:00 +0000, BobZ2 [MVP] wrote:

    On Fri, 26 Nov 2010 10:40:46 +0000, ChrisWhatever1980 wrote:

    Hello,

    I am trying to make a fullscreen application which loads an xml file and parses it to create a menu. Background and button images were created with a resolution of 240x320 in mind.

    Fullscreen on this resolution is achieved by setting the window dimensions using the MoveWindow-function.

    Unfortunately, this way fullscreen on a 480x640 display is not possible because the menu would cover only one quarter of the screen. The rest shows the Windows Mobile desktop.

    You might check the SHInitDialog and SHFullscreen functions.


    The users shouldn't have to create and maintain a separate xml-file (and separate images) for each resolution.

    Is there a function to just scale the window content in its entirety depending on the resolution?

    I don't know any way to automatically scale a window and controls in it.

    I meant to add, that you can certainly check the screen size, and write code to resize
    your main window and then resize and position all its controls.


    Are there other ways to solve this problem?

     

    Thank you for your help :)Christian Schlager

    Saturday, November 27, 2010 9:05 PM
  • Hi,

    You might consider to make your application resolution aware in terms of the way following article introduced:

    http://msdn.microsoft.com/en-us/library/ms838275.aspx

    Thanks

    Binze


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    • Marked as answer by Bin-ze Zhao Thursday, December 2, 2010 3:13 AM
    Tuesday, November 30, 2010 7:54 AM
  • Hello,

    Sorry, I solved the problem and forgot to check back here.

    The thing is, a previous version of the application did fullscreen mode and I couldn't figure out where the heck in the code it happened.

    Anyway, i gave up looking for it and just added an extra function to resize and reposition the controls depending on the resolution.

    Now it works just fine!

    The previous programmer probably forgot to commit it to version control.

     

    Thanks :)

    Wednesday, December 8, 2010 10:25 AM