INFO: Dynamically Resizing an Application at Runtime

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Support
    Forum Member
    • Jan 2000
    • 204

    INFO: Dynamically Resizing an Application at Runtime

    INFO: Dynamically Resizing an AutoPlay Application at Runtime

    INFO: Dynamically Resizing an AutoPlay Application at Runtime

    Document ID: IR04025
    The information in this article applies to:
    • AutoPlay Media Studio 4.0

    SUMMARY

    This article provides information on dynamically resizing your AutoPlay application at runtime using AutoPlay Media studio 4.0.

    DISCUSSION

    In AutoPlay Media Studio 4.0, the user's screen resolution can be queried at runtime by using the System.GetInformation action. The two properties that are needed to get the screen resolution are:

    • Horizontal Resolution - The user’s screen width in pixels.
    • Vertical Resolution - The user’s screen height in pixels.

    Here is an example of how you would store the horizontal and vertical resolution of the users screen in two variables:

    %HorizontalRez% = System.GetInformation ( "Horizontal Resolution")
    %VerticalRez% = System.GetInformation ( "Horizontal Resolution")

    When working with screen resolution it is important to know what the possible options are. The three most common screen resolutions are: 640x480, 800x600, and 1024x768. According to www.websidestory.com, 800x600 is the most common screen resolution, being used on about 50% of computers. The second most common is 1024x768, which accounts for about 30% of computers. 640x480 used to be the most popular screen resolution, but as monitors become larger the number of people using this resolution continues to decrease. Currently this number hovers around 5%.

    Best Practice: It is generally considered the best practice to design your AutoPlay application with the lowest common denominator in mind. This means that (for now) 640x480 is usually the size you should work with.

    To force your AutoPlay application to be full screen on all systems select: Project | Settings from the menu to display the Project Settings dialog. Then on the Settings tab check the Full screen checkbox.

    If the end user's screen resolution is greater than the Page Size you defined on the Settings tab of the Project Settings dialog, the application will be "banded" by the color defined as the Background color for the current page. This means that if an AutoPlay application was designed for 640 x 480 and was resized to 800 x 600, the "original" 640 x 480 application would appear in the center of the user's screen. The leftover area that surrounds the 640 x 480 would be the color defined as the Background color for the current page.

    If you would like to dynamically resize your AutoPlay application at runtime, use the Window.Move action to set the width and height of your AutoPlay application. As with the Full screen checkbox your application will be "banded" with the Background color if it is sized larger then the Page size. It is important to remember that none of the elements (page backgrounds, objects) in your AutoPlay application will be resized at runtime, only the background will change. The perspective and positions of all elements will remain the same. This means that if you shrink your AutoPlay application using the Window.Move action certain elements may not be visible.

    One last way to handle multiple screen resolutions is to create separate AutoPlay applications that are designed for the various screen resolutions as well as one main controller application. In this case, you would create an AutoPlay application that simply detects the user's screen resolution, launches another AutoPlay application that is sized appropriately and then closes down again. This main controller application would be the "first" AutoPlay application on the CD-ROM in that it would be the one in the root folder. The other AutoPlay applications would be located in sub-directories and launched from there.

    MORE INFORMATION

    For more information please see the following topic in the AutoPlay Media Studio 4.0 Help file:

  • Command Reference | Actions | System | Get Information
  • Command Reference | Actions | Window | Move
  • Command Reference | Project Settings
  • KEYWORDS: AutoPlay Media Studio 4.0, Screen Resolution, Resizing


    Last reviewed: October 30, 2002
    Copyright © 2002 Indigo Rose Corporation. All rights reserved.
Working...
X