Cicode Programming Reference > Cicode Function Categories > Window Functions Introduction > WinNumber

WinNumber

Gets the window number of the active CitectSCADA window. This number can be used with other functions to control the window.

Syntax

WinNumber([sName])

sName:

String name previously associated with a window number using WinSetName().

Return Value

Window Number associated with the Name provided. If no Name is specified then the active window number is returned. If there isn't a valid window number associated with the name provided then -1 is returned.

Related Functions

WinNew, WinGoto, WinSetName

Example

! Create a new window, but keep the active window the same:
Window=WinNumber();
WinNew("Alarm");
WinGoto(Window);

See Also

Window Functions