ZennoLab Assemblies Documentation
MaximizeWindow Method
Example 

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.

Performs the maximization of the specified window.
Syntax
public static string MaximizeWindow( 
   string name,
   bool topMost
)

Parameters

name

Type: System.String

The header of the window.

topMost

Type: System.Boolean

true if need to show the window on top of all; otherwise, false. Default value is false.

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 MaximizeWindow method.
// maximize the window
string result = Emulator.MaximizeWindow("TestForm");
// check the result
if (result == "ok" && !Emulator.ErrorDetected) return "Window was maximize";
else return "Fail";
// maximize the window
$result = ZennoLab\Emulation\Emulator::MaximizeWindow("TestForm");
// check the result
if ($result == "ok" && !ZennoLab\Emulation\Emulator::ErrorDetected) return "Window was maximize";
else return "Fail";
Requirements

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

See Also

Reference

Emulator Class
Emulator Members
ActiveWindow Method
MinimizeWindow Method
CloseWindow Method

Send Feedback