Is there any way to compare the type of controls?
Suppose I have one dll [.NET control ] on one folder. I have added this control onto the toolbox of Visual Studio 2003. then put it onto the form. run it.. After I got the object of this form, i like to compare the object of control of this form and the object of dll.
Is there any way to do like that?
Any idea would be appreciated.
To get the type of an application's control, you can invoke the control's GetType method and check property FullName of the object it returns. For example:
</font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">Sub Test
Set p = Sys.Process("MyApp"
Set w = p.Form1
Set myButton = w.button1
End Sub</pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">As for getting the type name directly from an assembly, you can use the dotNETBridge plug-in. Please refer to the "Calling Functions From .NET Assemblies" Help topic to learn how you can create an instance of the object and invoke its GetType method via the dotNET TestComplete's object.