RanorexRanorex Documentation
GetApplicationForm Method (processId, timeout)
NamespacesRanorexHostGetApplicationForm(Int32, Duration)
Gets the main Form of a process.
Declaration Syntax
C#Visual BasicVisual C++
public Form GetApplicationForm(
	int processId,
	Duration timeout
)
Public Function GetApplicationForm ( _
	processId As Integer, _
	timeout As Duration _
) As Form
public:
Form^ GetApplicationForm(
	int processId, 
	Duration^ timeout
)
Parameters
processId (Int32)
The ID of the process to get the main Form from.
timeout (Duration)
The time to keep searching for a Form instance belonging to the process.
Return Value
A Form belonging to the specified process ID.
Remarks
If more Form instances are found for the process ID, the last Form found is returned (to avoid popups).
Exceptions
ExceptionCondition
ElementNotFoundExceptionIf no Form belonging to the specified process ID is found within the timeout.

Assembly: Ranorex.Core (Module: Ranorex.Core) Version: 3.2.3.16825 (3.2.3.16825)