Results 1 to 5 of 5

Thread: Axwebbrowser - how to do actions depending on browsed site title!

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2004
    Location
    Portugal
    Posts
    4

    Axwebbrowser - how to do actions depending on browsed site title!

    First would like to say hi to everybody on the board, hope i learn alot and soon can also teach something

    I would like to know how can i check the webbrowser title and do actions depending on it like:

    if title = x then do y

    Thanks in advance
    Regards

  2. #2
    Frenzied Member dynamic_sysop's Avatar
    Join Date
    Jun 2003
    Location
    Ashby, Leicestershire.
    Posts
    1,142
    something along these lines maybe ...
    VB Code:
    1. Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    2.         AxWebBrowser1.Navigate("http://google.com")
    3.     End Sub
    4.  
    5.     Private Sub AxWebBrowser1_DocumentComplete(ByVal sender As Object, ByVal e As AxSHDocVw.DWebBrowserEvents2_DocumentCompleteEvent) Handles AxWebBrowser1.DocumentComplete
    6.         If AxWebBrowser1.LocationName = "Google" Then
    7.             AxWebBrowser1.Navigate("http://msn.com")
    8.         End If
    9.     End Sub
    ~
    if a post is resolved, please mark it as [Resolved]
    protected string get_Signature(){return Censored;}
    [vbcode][php] please use code tags when posting any code [/php][/vbcode]

  3. #3

    Thread Starter
    New Member
    Join Date
    Feb 2004
    Location
    Portugal
    Posts
    4
    Thanks alot m8, it worked pretty good, now just need to integrate it where i want (gonna try to find out how to do that by myself )

    BTW do you know how to "configure" webbrowser control to not load images?

    cheers

  4. #4
    Frenzied Member dynamic_sysop's Avatar
    Join Date
    Jun 2003
    Location
    Ashby, Leicestershire.
    Posts
    1,142
    you will need to look at the IDocHostUIHandler interface / or somehow get the source of the site / filter all the image tags out / load that source back in to your browser.
    the link for IDocHostUIHandler on msdn ( C++ ) is ...IDocHostUIHandler
    ~
    if a post is resolved, please mark it as [Resolved]
    protected string get_Signature(){return Censored;}
    [vbcode][php] please use code tags when posting any code [/php][/vbcode]

  5. #5

    Thread Starter
    New Member
    Join Date
    Feb 2004
    Location
    Portugal
    Posts
    4
    thanks alot m8, that is kinda out of my league but will take in consideratiion later

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width