tags:

views:

30

answers:

1

I am looking for a way to once I see a form by Name add a button to that form and when the user clicks the added button, pull information from the form. For example, if I see the for title - "Stack Overflow - Wnidows Internet Explorer" I would add a button "MyButton" on the form, and when that button is clicked, I would "pull" the information from the "search" box. It should work on Web or Win forms.

Any help would be greatly appreicated.

A: 

I found my answer

You need to get the window handle to the form in question.

To put the button on another form you need to create the button and set its owner to the other window and set the buttons window position.

You can use the same window handle to enumerate the child windows to get the text if its an edit control.

David23g