VB6 WebBrowser control


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: VB6 WebBrowser control

  1. #1
    Join Date
    Jul 2007
    Posts
    46

    Question VB6 WebBrowser control

    In the vb6 form web browser and default web page open, in this web page contain one textbox where user input the some id number to retrieve information, is there way when we press button from vb from so some number filed in the textbox and execute to retrieve information. This button may act like barcode scanner (filed data in focued field and trigerd).

    Thanks for help
    Last edited by kafsar; 04-24-2009 at 10:30 AM.

  2. #2
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,666
    Are you talking about a VB textbox on a VB form that also has a VB webbrowser control on it?
    I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
    Please use [Code]your code goes in here[/Code] tags when posting code.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    Modifications Required For VB6 Apps To Work On Vista

  3. #3
    Join Date
    Jul 2007
    Posts
    46
    here is explanation:

    opened web page by VB6 WebBrowser contol, this web page cantain textbox call textbox1 but there no submit button, so when inout the number in the textbox end press enter page retrive informatin from the database. I have the following code which place input data (number or text) in textbox and triger the bubmit button to retrive information automatically, but sine the page have no submit button and only press enter in the textbox to retrive information, please some one look the code and advise how can trigger the input textbox.

    code: THIS CODE WORKED FINE IF PAGE HAVE SUBMIT BUTTON.

    Private Sub Command1_Click()

    Dim htmlSearchButton As HTMLButtonElement

    Set docCurrentHTML = WebBrowser1.Document.documentElement.All

    ' This field the value in web page textbox1

    For Each Item In docCurrentHTML

    If Item.tagName = "INPUT" Then
    If Item.Name = "textbox1" Then
    Item.Value = "1148"
    Exit For
    End If
    End If


    Next Item


    ' The data is in. Now find the button and click it,

    ' HERE IS I HAVE PROBLEM, SINCE THERE IS NO SUBMIT BUTTON THE COSE SHOULS CLICK TEXTBOX1

    For Each Item In docCurrentHTML

    If Item.tagName = "INPUT" Then
    If Item.Name = "textbox1" Then
    Set htmlSearchButton = Item
    htmlSearchButton.Click
    Exit For
    End If
    End If

    Next Item

    Thanks

Similar Threads

  1. Replies: 1
    Last Post: 09-20-2007, 11:12 AM
  2. Replies: 0
    Last Post: 07-23-2007, 02:26 PM
  3. webbrowser control
    By el__sid in forum VB Classic
    Replies: 5
    Last Post: 06-24-2005, 10:05 PM
  4. Drag capture screen of Webbrowser control
    By Phil N. in forum VB Classic
    Replies: 3
    Last Post: 10-30-2001, 09:57 AM
  5. WebBrowser control...
    By FLD in forum Enterprise
    Replies: 2
    Last Post: 11-20-2000, 11:34 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center