WinNew
Opens a new display window, with a specified page displayed. The window can later be destroyed with the WinFree() function.
You can also specify if the displayed page operates within the context of a particular cluster in a multiple cluster project. When the page is displayed during runtime, the ClusterName argument is used to resolve any tags that do not have a cluster explicitly defined.
Note: This function is not supported in the server process in a multiprocessor environment. Calling this function from the server process results in a hardware alarm being raised.
Syntax
WinNew(Page,ClusterName)
Page:
The name or page number of the page to display (in quotation marks ""). Can be prefixed by the name of a host cluster, that is "ClusterName.Page". This will take precedence over the use of the ClusterName parameter if the two differ.
ClusterName:
The name of the cluster that will accommodate the page at runtime. This is optional if you have one cluster or are resolving the page via the current cluster context. The argument is enclosed in quotation marks "". If the Page parameter is prefixed with the name of a cluster, this parameter will not be used.
Return Value
The window number of the window, or -1 if the window cannot be opened. Be aware that this is not the same as the window handle returned from the WndFind() function.
Related Functions
Example
! If the display window being opened is window number 2:
Window=WinNew("Alarm");
! Displays the Alarm page and sets Window to 2.
See Also