SetViewerPos
- Last UpdatedOct 29, 2026
- 2 minute read
SetViewerPos is a built-in function that sets the height, width, and position of the project viewer or thin client window.
|
Function |
Group |
Execution |
String Exp. |
Windows |
Windows Embedded |
IoT View |
Thin Clients |
Mobile Access |
|---|---|---|---|---|---|---|---|---|
|
SetViewerPos |
Module Activity |
Synchronous |
No |
Supported |
Not supported |
Not supported |
Supported |
Not supported |
Syntax
SetViewerPos(numLeft,numTop,optNumWidth,optNumHeight)
SetViewerPos ( numLeft , numTop { | ,optNumWidth,optNumHeight } )
numLeft
The position (in pixels) of the left edge of the Viewer program window.
numTop
The position (in pixels) of the top edge of the Viewer program window.
optNumWidth
The width (in pixels) of the Viewer program window.
This parameter is optional; if no value is specified, the default value is the project's current display resolution.
optNumHeight
The height (in pixels) of the Viewer program window.
This parameter is optional; if no value is specified, the default value is the project's current display resolution.
Return value
If the function fails, the return value is zero (0).
If the function succeeds, the return value is one (1).
Notes
For the purposes of this function, "Viewer program" is a generic term that includes:
-
The local Viewer that is part of the project runtime for Windows
-
The standalone Secure Viewer program for Windows
-
The Web Thin Client add-on (also known as ISSymbol) for Internet Explorer
It does not include any version of Mobile Access, which uses a different technology to display project screens in web browsers.
If you use this function in your project, make sure the Start Maximized option in your project settings is cleared. For more information, see Viewer tab.
Examples
Set the Viewer so that its top-left corner is at 50x,50y and its size is 640x480:
SetViewerPos(50,50,640,480)