| ZennoLab.Emulation Assembly > ZennoLab.Emulation Namespace > Emulator Class : ActiveWindow Method |
Type: System.String !
The header of the window.
Type: System.Boolean
true if need to show the window on top of all; otherwise, false. Default value is false.
Type: System.String !
The header of the window.
Type: System.Boolean
true if need to show the window on top of all; otherwise, false. Default value is false.
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.
There are several ways of calling this method. The parameter topMost have the default value and you can call the method without this parameter. See examples.
This method calls automatically every time when you use methods from ZennoLab.Emulation.
// activate the first window just show it string result = Emulator.ActiveWindow("First window"); // if was not any errors if (result == "ok" && !Emulator.ErrorDetected) { // also activate the second window just show it but set the parameters topMost == false result = Emulator.ActiveWindow("Second window", false); // if was not any errors if (result == "ok" && !Emulator.ErrorDetected) { // also activate the third window and show on top of all. Set the parameters topMost == true result = Emulator.ActiveWindow("Third window", true); // if all nice if (result == "ok" && !Emulator.ErrorDetected) return "All in openwork boss!"; // if bad else return "Fail: The third window"; } else return "Fail: The second window"; } else return "Fail: The first window";
// activate the first window just show it $result = ZennoLab\Emulation\Emulator::ActiveWindow("First window"); // if was not any errors if ($result == "ok" && !ZennoLab\Emulation\Emulator::ErrorDetected) { // also activate the second window just show it but set the parameters topMost == false $result = ZennoLab\Emulation\Emulator::ActiveWindow("Second window", false); // if was not any errors if ($result == "ok" && !ZennoLab\Emulation\Emulator::ErrorDetected) { // also activate the third window and show on top of all. Set the parameters topMost == true $result = ZennoLab\Emulation\Emulator::ActiveWindow("Third window", true); // if all nice if ($result == "ok" && !ZennoLab\Emulation\Emulator::ErrorDetected) return "All in openwork boss!"; // if bad else return "Fail: The third window"; } else return "Fail: The second window"; } else return "Fail: The first window";
Target Platforms: Desktop: Windows XP SP3 and older. Server: Windows Server 2003 and older.