Click here to Skip to main content
15,911,360 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi

I am coding for a tool which will operate another windows application. I got success to catch all the handles of windows and its control. The windows has a treeview and I want to expand that treeview and click on a particular node so i can see its child nodes.

Does any one have solution for this in C#?

Please note that I can catch hanlde of the treeview.

Thanks.
Posted
Updated 1-Dec-11 23:45pm
v2
Comments
SercanOzdemir 2-Dec-11 7:04am    
Can you explain more please.Which treeview do u talk about? And show us a code part to see more.

1 solution

You are trying to pose a bad problem. It totally depends on that application; in general case, you hardly can get reliable results unless you have a source code of the application to be controlled or this application supports some accessibility API.

Even if you have a source code of the application to be controlled, it would be much better to convert it to a library and integrate it directly into your process. Generally, integration of a separate process is a really bad thing unless it is specifically designed to be used in this way.

Some try to simulate keyboard/mouse user input (which is quite possible) to directly use the UI of the application to be controlled and get some results. This is dirty thing which never can be 100% reliable; forget about maintenance of such "solution". I would not even recommend to try.

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900