How Can We Help?
How to Use Multiscreens in the Viewer
Purpose of this article
This article aims to show how to use multiple screens in a viewer. For this article, we will use the following example:
- The Viewer has a resolution of 1920×1080, that is, 1920 in width and 1080 in height.
- A viewer will show two screens.
- The screen called “Frame1” will be the main screen, where the application will start.
- The screen called “Frame2” will be the second screen, located to the left of the “Frame1” screen.
![](https://guides.adisra.com/wp-content/uploads/2023/06/image-232.png)
1. Configuring the screen resolution of the application
- Create a new application and then click on the “Settings” tab and then set the viewer resolution to 1920×1080.
![](https://guides.adisra.com/wp-content/uploads/2023/06/image-214.png)
- Create two screens. Frame1 and Frame2.
![](https://guides.adisra.com/wp-content/uploads/2023/06/image-218.png)
- Set the Frame1 screen as the application’s home screen.
![](https://guides.adisra.com/wp-content/uploads/2023/06/image-219.png)
- Let’s identify each screen. Insert a label object into the “Frame1” canvas.
![](https://guides.adisra.com/wp-content/uploads/2023/06/image-221.png)
- Insert the label object into the “Frame2” screen.
![](https://guides.adisra.com/wp-content/uploads/2023/06/image-224.png)
- On the “Frame1” screen, click on the screen area and in the “onOpen” event, insert the following script:
SVGraphics.Open("Frame2");
This script aims to use the SVGraphics.Open function to open a screen. Therefore, whenever screen “Frame1” is opened by the application, screen “Frame2” will also be opened.
![](https://guides.adisra.com/wp-content/uploads/2023/06/image-222.png)
- On the “Frame1” and “Frame2” screen, in the property list, keep the properties as follows:
![](https://guides.adisra.com/wp-content/uploads/2023/06/image-225.png)
- On the “Frame1” screen, keep the screen, keep the “Top” property at “0”.
![](https://guides.adisra.com/wp-content/uploads/2023/06/image-226.png)
- On the “Frame2” screen, set the “Top” property to “-1920”.
![](https://guides.adisra.com/wp-content/uploads/2023/06/image-227.png)
- Save and run the application. Below is the expected result.
![](https://guides.adisra.com/wp-content/uploads/2023/06/image-228-1024x288.png)
- If you want to open more screens, for example a third screen to the right of the main screen, insert another function “SVGraphics.Open” in the OnOpen event of screen “Frame1” and on the right screen, set the property “Top” to “1920 “.
![](https://guides.adisra.com/wp-content/uploads/2023/06/image-230-1024x284.png)