| View previous topic :: View next topic |
| Author |
Message |
arishahsan
Joined: 18 Jan 2007 Posts: 26
|
Posted: Wed Jan 31, 2007 8:04 am Post subject: Can we Identify A new form by Its Control Name |
|
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 |
|
| Back to top |
|
 |
admin Site Admin
Joined: 05 Jul 2006 Posts: 351
|
Posted: Wed Jan 31, 2007 9:49 pm Post subject: |
|
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:
Code: click into code to enlarge
if (form.Text != "Form title" || form.ClassName != "Class name")
{
Console.WriteLine("ERROR: invalid form ...");
return 1;
}
Jenö |
|
| Back to top |
|
 |
|