Click here to Skip to main content
15,921,990 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: New Baby Pin
Allah On Acid10-Nov-05 17:33
Allah On Acid10-Nov-05 17:33 
QuestionHow to work with Printer Object in VB6 Pin
shoaibnawaz10-Nov-05 4:19
shoaibnawaz10-Nov-05 4:19 
Questionupdateing datagrid Pin
microuser_200010-Nov-05 3:04
microuser_200010-Nov-05 3:04 
QuestionSearch Page Pin
macca2410-Nov-05 0:25
macca2410-Nov-05 0:25 
AnswerRe: Search Page Pin
Mandar Patankar10-Nov-05 4:01
Mandar Patankar10-Nov-05 4:01 
QuestionPoint Function Pin
varun_7899-Nov-05 22:40
varun_7899-Nov-05 22:40 
QuestionUrgent Help Needed!!!(AxWebBrowser) Pin
Sufyan_shani9-Nov-05 21:51
Sufyan_shani9-Nov-05 21:51 
AnswerRe: Urgent Help Needed!!!(AxWebBrowser) Pin
Steve Pullan10-Nov-05 12:31
Steve Pullan10-Nov-05 12:31 
You need to obtain a reference to the control to which you want to send the value and then set it. The trick is to get the Name of the control to obtain the reference. For this you can inspect the source code for the target page.

This is some sample code that loads the Google web site in an AxWebBrowser control, sets the search value to "axwebbrowser" and auto-presses the Search button. I based this example on one I found on the web somehere a while ago.

Assuming the web browser control is named web1, navigate to the web site in your Sub Main() (or whatever).

web1.Navigate("http://www.google.com")

In web1's DocumentComplete event:

Private Sub web1_DocumentComplete(ByVal sender As Object, ByVal e As AxSHDocVw.DWebBrowserEvents2_DocumentCompleteEvent) Handles web1.DocumentComplete

        ' Get the web document
        Dim myDoc As mshtml.HTMLDocument
        myDoc = DirectCast(web1.Document, mshtml.HTMLDocument)

        ' Get the reference to the search text input box.
        ' The name of this control is "q" which I found from
        ' inspecting the page's source code.
        Dim otxtSearchBox As mshtml.HTMLInputElement
        otxtSearchBox = DirectCast(myDoc.all.item("q", 0), mshtml.HTMLInputElement)

        ' Set the search value to "axwebbrowser"
        otxtSearchBox.value = "axwebbrowser"

        ' Get a reference to the search button and simulate
        ' pressing it by calling the control's Click() event.
        Dim btnSearch As mshtml.HTMLInputElement
        btnSearch = DirectCast(myDoc.all.item("btnG", 0), mshtml.HTMLInputElement)

        btnSearch.click()

        ' The web control will now update and presnet the search results.

End Sub


...Steve
GeneralRe: Urgent Help Needed!!!(AxWebBrowser) Pin
Sufyan_shani10-Nov-05 20:02
Sufyan_shani10-Nov-05 20:02 
QuestionInstalling a DLL file Pin
mcwayne9-Nov-05 21:33
mcwayne9-Nov-05 21:33 
QuestionPlease,pleazzzzz help me... Pin
Deema Jack9-Nov-05 20:47
Deema Jack9-Nov-05 20:47 
AnswerRe: Please,pleazzzzz help me... Pin
Steve Pullan10-Nov-05 12:42
Steve Pullan10-Nov-05 12:42 
GeneralRe: Please,pleazzzzz help me... Pin
Deema Jack10-Nov-05 16:34
Deema Jack10-Nov-05 16:34 
GeneralRe: Please,pleazzzzz help me... Pin
Steve Pullan10-Nov-05 17:01
Steve Pullan10-Nov-05 17:01 
GeneralRe: Please,pleazzzzz help me... Pin
Deema Jack10-Nov-05 17:23
Deema Jack10-Nov-05 17:23 
GeneralRe: Please,pleazzzzz help me... Pin
Steve Pullan10-Nov-05 18:49
Steve Pullan10-Nov-05 18:49 
GeneralRe: Please,pleazzzzz help me... Pin
Deema Jack10-Nov-05 21:43
Deema Jack10-Nov-05 21:43 
Questionweb service function question Pin
maxiachun9-Nov-05 17:31
maxiachun9-Nov-05 17:31 
QuestionHELP!!!!!!!- How to decompile .DLL file to get source code back???? Pin
vicky4579-Nov-05 14:30
vicky4579-Nov-05 14:30 
AnswerRe: HELP!!!!!!!- How to decompile .DLL file to get source code back???? Pin
Steve Pullan9-Nov-05 18:17
Steve Pullan9-Nov-05 18:17 
AnswerRe: HELP!!!!!!!- How to decompile .DLL file to get source code back???? Pin
rwestgraham9-Nov-05 18:27
rwestgraham9-Nov-05 18:27 
QuestionOpening a file to show number of sentences Pin
los_coronado9-Nov-05 12:11
los_coronado9-Nov-05 12:11 
AnswerRe: Opening a file to show number of sentences Pin
Steve Pullan9-Nov-05 12:27
Steve Pullan9-Nov-05 12:27 
GeneralRe: Opening a file to show number of sentences Pin
los_coronado9-Nov-05 14:16
los_coronado9-Nov-05 14:16 
GeneralRe: Opening a file to show number of sentences Pin
Steve Pullan9-Nov-05 14:35
Steve Pullan9-Nov-05 14:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.