ZennoLab Assemblies Documentation
CloseWindow Method
See Also  Example Send Feedback
ZennoLab.Emulation Assembly > ZennoLab.Emulation Namespace > Emulator Class : CloseWindow Method
name

Type: System.String

The header of the window.

Glossary Item Box

Closes a window with specified header.

Syntax

C# 
public static string CloseWindow( 
   string name
)

Parameters

name

Type: System.String

The header of the window.

Return Value

Type: System.String

The answer with information about the success of the current command's execution. If current command was successful then this answer is "ok"; otherwise message describing the error.

Remarks

For using of this method not required the call ActivateWindow method.

Example

The following code example demonstrates uses of the CloseWindow method.
C#Copy Code
// close the window
string result = Emulator.CloseWindow("TestForm");
// check the result
if (result == "ok" && !Emulator.ErrorDetected) return "Window was closed";
else return "Fail";
PHPCopy Code
// close the window
$result = ZennoLab\Emulation\Emulator::CloseWindow("TestForm");
// check the result
if ($result == "ok" && !ZennoLab\Emulation\Emulator::ErrorDetected) return "Window was closed";
else return "Fail";

Requirements

Target Platforms: Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2014 All Rights Reserved.