I have to verify that the Opened form is the expected form or not and for that I am using the Control Name of the form but when I am using
NewForm = Application.FindFormTitle("FormTitle");
NewForm.FindControlName ("Control Name Of the New Form");
I am always getting null
so could u tell me how to verify a form by its Control Name
Can we Identify A new form by Its Control Name
-
- Posts: 26
- Joined: Thu Jan 18, 2007 12:04 pm
The function form.FindControlName searches the child control with the specified name in the form, but do not return the control name of the form. You can use the form.ControlName property only in the next version V1.1.0.
Use the ClassName property in V1.0.0 to verify the form:
Jenö
Use the ClassName property in V1.0.0 to verify the form:
Code: Select all
if (form.Text != "Form title" || form.ClassName != "Class name")
{
Console.WriteLine("ERROR: invalid form ...");
return 1;
}