Close is a built-in scripting function that closes an open project screen.

Function Group Execution Windows Embedded Thin Client
Close Screen Asynchronous Supported Supported Supported


Close(strScreen { | ,optNumID } )
The name of the screen (not including the .scr extension) to be closed.
Note: Some Web servers are case-sensitive. If you plan to deploy your project as a Web application, then you should use only lowercase letters for the screen name.
The specific ID or instance number of the screen to be closed, if there is more than one screen with the same name open. (The ID is assigned when the screen is opened with the Open function.)

This is an optional parameter. If no value is specified, then the default ID is 0.

Returned value

This function does not return any value.


This function cannot be used with Tasks or in the Global Procedures script.

Also, in some cases, you do not need to call this function to close a screen because the screen will be closed automatically when another screen replaces it. For more information, see Screen Attributes.


Close the screen named "main":
Close( "main" )
Close the screen named "alarms":
Close( "alarms" )
Close the screen named "main" with ID 10:
Close( "main", 10 )