Get .NET control type

G

Guest

Hi

Is there any way by which I can get the ControlType like System.Windows.Forms.Button from an handle of the control.

I want to list number of controls per control type (System.Windows.Forms.*) present in any .NET application from other application. And/Or I want to list all .NET controls and their names (Button1, Button2, etc) in any .NET application

Any ideas

Regards
Neelesh
 
G

Guest

Something more:

What I have is handle to the MainApplication window, found using EnumWindows and matching the title of the application for each handle. Now using this handle (application handle) as start point I'm enumerating all winodows using EnumChildWindows and I want to determine the type as System.Windows.Forms.Button (as mentioned in the previous mail) for each of the hwnd that I get.

Just to put it more clearly, I am writing an external program to display hierarchy of controls(handle wise with ControlType as above) in any given .NET application.

Rgds,
Neelesh
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top