The function retrieves a new form whose title match the specified strings.
| C# | Visual Basic | Visual C++ |
public static Form FindFormTitle( string title, SearchMatchMode titleSearchMatchMode )
Public Shared Function FindFormTitle ( _ title As String, _ titleSearchMatchMode As SearchMatchMode _ ) As Form
public: static Form^ FindFormTitle( String^ title, SearchMatchMode titleSearchMatchMode )
- 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
A new form or null if an error occurs.
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. |
