Results 1 to 6 of 6

Thread: [RESOLVED] Permanent URL on web browser

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Apr 2011
    Posts
    67

    Resolved [RESOLVED] Permanent URL on web browser

    Good day,

    How can I make the webbrowser to only open a specific url once the application run?

    Best Regards

    Jakesie

  2. #2
    Frenzied Member HanneSThEGreaT's Avatar
    Join Date
    Nov 2003
    Location
    Vereeniging, South Africa
    Posts
    1,492

    Re: Permanent URL on web browser

    VB.NET MVP 2008 - Present

  3. #3
    Junior Member
    Join Date
    Oct 2013
    Posts
    19

    Re: Permanent URL on web browser

    Easy, all you have to do is go to the properties of web browser and insert the link where it says "URL". And if you don't want them navigating off of that certain page you can add a timer that and set it to enabled and double click it and go type this in:

    Code:
    if not WebBrowser1.Url.ToString.StartsWith("http://www.WEBSITE HERE.com") then
    WebBrowser1.Navigate("http://www.WEBSITE HERE.com")
    end If
    Okay, to tell you truth I have never done something like that so I don't know if that code will work but if somebody knows it won't please post the right code. And if you have any more questions please let us know.

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Apr 2011
    Posts
    67

    Re: Permanent URL on web browser

    Awesome, Thanks a LOT!

    Best Regards

  5. #5
    Bad man! ident's Avatar
    Join Date
    Mar 2009
    Location
    Cambridge
    Posts
    5,398

    Re: [RESOLVED] Permanent URL on web browser

    No do not use a timer. Handle the event of the browsers navigating params s and validate its the correct url

  6. #6
    Junior Member
    Join Date
    Oct 2013
    Posts
    19

    Re: [RESOLVED] Permanent URL on web browser

    @ident, Good point. Ignore my post using a timer, just find the actions panel for the web browser and find navigated and double click on that. And then in there type the exact same code I gave you up there. Then go ahead and delete the timer code and the timer.

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