Appendix: Built-in Scripting Language Syntax SetViewerInFocus() There are no parameters. Returned value This function does not return any value. Notes Beginning with Windows XP, system security features prevent program windows from moving themselves in front of others without user input. As such, when you call this function, the Viewer program will request the user's attention by blinking in the Windows taskbar. (Some anti-virus software may also flag this as suspicious behavior.) Only when the user selects the program will the program window move to the front. To work around this, you must call SetViewerInFocus at least once in your project's Startup Script .
Allow twenty seconds more for your project to finish starting up, and then after that, any additional calls of this function should work normally. Examples SetViewerInFocus() SetViewerPos Sets the height, width, and position of the project viewer or thin client. Syntax SetViewerPos( numLeft , numTop , optNumWidth , optNumHeight ) numLeft A numeric flag that specifies the left-side position of the Viewer in pixels. numTop A numeric flag that specifies the top-side position of the Viewer in pixels. optNumWidth Optional numeric tag specifying the Viewer width in pixels. optNumHeight Optional numeric tag containing the Viewer height in pixels. Returned value Examples Note:
When you omit the optional parameters ( numWidth and numHeight ), IWS gets size of the Viewer window from the project resolution. Page 516 InduSoft Web Studio Function Group Execution Windows Embedded Thin Client SetViewerPos Module Activity Synchronous Supported Not supported Supported 0 Error 1 Success Tag Name Expression Tag SetViewerPos( 50, 50, 640, 480 )