RanorexNetRanorexNet Documentation
GetMainWindowFromProcess Method (proc, timeout)
NamespacesRanorexApplicationGetMainWindowFromProcess(Process, Int32)
Tries to retrieve the main window from the specified process before the timeout is elapsed.
Declaration Syntax
C#Visual BasicVisual C++
public static Form GetMainWindowFromProcess(
	Process proc,
	int timeout
)
Public Shared Function GetMainWindowFromProcess ( _
	proc As Process, _
	timeout As Integer _
) As Form
public:
static Form^ GetMainWindowFromProcess(
	Process^ proc, 
	int timeout
)
Parameters
proc (Process)
The process to get the main window from.
timeout (Int32)
Specifies the maximum time in milliseconds to wait for the main window to show.
Return Value
The main window of the process or null if an exception is thrown and ErrorAsException is set to false.
Exceptions
ExceptionCondition
ArgumentNullExceptionIf proc is null.
ControlNotFoundExceptionIf no main window can be found within the specified timeout.

Assembly: RanorexNet (Module: RanorexNet) Version: 1.5.1.4524