Get .NET control type

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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
 
Back
Top