The function retrieves a new form whose title and class name match the specified strings.
| C# | Visual Basic | Visual C++ |
public static Form FindForm( string title, SearchMatchMode titleSearchMatchMode, string className, bool activate, int timeout )
- title (String)
- Title of the application.
- titleSearchMatchMode (SearchMatchMode)
- Defines how to match window titles during search operations. The following values can be used: MatchExact, MatchFromStart, MatchSubstring, MatchRegExp
- className (String)
- The class name of the form.
- activate (Boolean)
- Specifies whether the control is to be activated.
- timeout (Int32)
- Timeout in milliseconds.
A new form or null if an error occurs.
Supported only in RanorexPro.
This function does not search child windows. This function performs a case-sensitive search.
To search child windows, use the FormFindChild... functions.
If an application cannot find a form, the function returns null.
| Exception | Condition |
|---|---|
| ArgumentNullException | Thrown when the title is null. |
| ControlNotFoundException | Thrown when a control with the title cannot be found. |
