Get values from open ASP page into VB6 app

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bobbystrain
    New Member
    • Sep 2007
    • 11

    Get values from open ASP page into VB6 app

    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
  • jhardman
    Recognized Expert Specialist
    • Jan 2007
    • 3405

    #2
    I 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

    Comment

    • bobbystrain
      New Member
      • Sep 2007
      • 11

      #3
      Originally posted by jhardman
      I 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
      jhardman,
      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,

      Bobby

      Comment

      • urstop
        New Member
        • Oct 2007
        • 12

        #4
        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 bobbystrain
        jhardman,
        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,

        Bobby

        Comment

        • bobbystrain
          New Member
          • Sep 2007
          • 11

          #5
          Originally posted by urstop
          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
          Jhardman,
          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

          • urstop
            New Member
            • Oct 2007
            • 12

            #6
            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
            UrStop

            Comment

            • bobbystrain
              New Member
              • Sep 2007
              • 11

              #7
              Originally posted by urstop
              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
              UrStop
              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.

              Bobby

              Comment

              Working...