I cannot find how to extract information from the active asp page into a VB6 windows form. First, how do I refer to the active IE document? Then get selected data items from labels on the form, and then get them into a VB6 windows form for input? Thank you for your help
Get values from open ASP page into VB6 app
Collapse
X
-
Tags: None
-
Originally posted by jhardmanI don't understand what you mean.
Do you have some VB window that opens an HTML form written with ASP, then you need the data submitted with the form to go back to the VB window? Please explain what you are trying to do.
Jared
The open ASP document is from my website. The form contains textboxes, labels, etc. The Windows form is totally separate, but it needs to get some of the information from the web form. Otherwise, the user must type the values into the windows form, reading them from the web form. I want the windows app to retrieve the information directly from the web form so that the user does not need to interact.
Thanks,
BobbyComment
-
You can use the browser control object of VB 6.0 and open the ASP page using the control. It is equivalent to your IE browser and so you can use all the DHTML methods of IE from your VB code.
Regards,
UrStop
Originally posted by bobbystrainjhardman,
The open ASP document is from my website. The form contains textboxes, labels, etc. The Windows form is totally separate, but it needs to get some of the information from the web form. Otherwise, the user must type the values into the windows form, reading them from the web form. I want the windows app to retrieve the information directly from the web form so that the user does not need to interact.
Thanks,
BobbyComment
-
Originally posted by urstopYou can use the browser control object of VB 6.0 and open the ASP page using the control. It is equivalent to your IE browser and so you can use all the DHTML methods of IE from your VB code.
Regards,
UrStop
Yes, I know what to do once I identify the page. But how do you refer to the currently open document in the browser? All the code examples connect to a page with the browser control. But, I want to connect to the page that is already open and displayed in the browser.
And, thank you for your prompt response.Comment
-
I think there is a way using the windows APIs to enumerate thru all the open windows on your machine, and then identify if the window is a browser or not a browser, and if it is a browser get the refrence to its document object and then use the DHTML methods on the document and read the values from the required fields.
Regards
UrStopComment
-
Originally posted by urstopI think there is a way using the windows APIs to enumerate thru all the open windows on your machine, and then identify if the window is a browser or not a browser, and if it is a browser get the refrence to its document object and then use the DHTML methods on the document and read the values from the required fields.
Regards
UrStop
My apoligies for not addressing you properly on our last exchange. Your suggestion for using Windows API is beyond my present skill set. Can you cite a reference that I may consult, and understand?
And, thank you for your help. I shall continue to look in the direction of the API calls, too.
BobbyComment
Comment