Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to get the controls from window in C#

Status
Not open for further replies.

pratibha14

Technical User
Mar 2, 2004
30
i get the window using FindWindow function but can't get the controls of that window.
 

Welcome to TT pratibha14. To get the most from these fora please read FAQ222-2244.

Now to answer your question you then need to use EnumChildWindows to find the what you are looking for.

Good Luck

 

pratibha14, have you had any luck? Have you read FAQ222-2244?

Good Luck


 
hi,

u got my question wrong.
what i want to say is i get the process using getprocess method. and get associated window using findwindow and enumchildwindow. but now i want to get the control of that window.

i want all the labels, texts and all controls from that window.

ok goodbye
 
All the controls have handles that you can find with EnumChildWindows.

Please read faq222-2244 carefully to find how to get the best from this forum. Abrupt questions will usually only get abrupt answers

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'If we're supposed to work in Hex, why have we only got A fingers?'
 
thanks but u don't get my question.

i arbitarily takes a process running on localhost and then finds the associated window and also its child-window.

now what i need is control. i get all the handles that are there in the window but when i try to get control from those handle through FromHandle() method, it shows the error. i want to know all the controls used, their name etc. i tried GetNextDlgGroupItem() and GetDlgCtrlID() method.
I get all the control with their property of only the process (project.exe) in which i have written the code. but can't get them for all process.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top