connect to website via txt box

Discussion in 'Archives' started by damien121, Jul 6, 2007.

connect to website via txt box
  1. Unread #1 - Jul 6, 2007 at 6:57 AM
  2. damien121
    Joined:
    May 3, 2007
    Posts:
    489
    Referrals:
    0
    Sythe Gold:
    0

    damien121 Forum Addict

    connect to website via txt box

    Hello,
    i am new to visual basic but know just a few things.
    Right now i am wondering....

    i know how to connect to a website via commandbutton.
    This code works:
    CODEPrivate Sub Command1_Click()
    WebBrowser1.Navigate "www.solidrune.com"
    End Sub

    And i want to know how it would connect to the website they have typed in a certain textbox.

    someone said this...


    QUOTE
    Well instead of typing the url type text1.text (which is what you should name it before doing it)
    eg:
    Private Sub Command1_Click()
    WebBrowser1.Navigate "text1.text"
    End Sub
    And it then connects to the website address from text1!
    happy coding.


    i have done this several times.
    But when they type url in textbox 1 and press the command button it just says page cannot be displayed.

    Please help me out.
    Thanks

    Origianally posted at: http://cruels.net/index.php?showtopic=5676
     
  3. Unread #2 - Jul 6, 2007 at 7:02 AM
  4. Ryan
    Joined:
    Mar 14, 2006
    Posts:
    2,946
    Referrals:
    31
    Sythe Gold:
    56

    Ryan Hopeless Romantic
    Banned

    connect to website via txt box

    Do you want it to connect straight away when the URL is in it, or connect after you click the button?
     
  5. Unread #3 - Jul 6, 2007 at 7:07 AM
  6. damien121
    Joined:
    May 3, 2007
    Posts:
    489
    Referrals:
    0
    Sythe Gold:
    0

    damien121 Forum Addict

    connect to website via txt box

    after you click command1 button
     
  7. Unread #4 - Jul 6, 2007 at 7:36 AM
  8. damien121
    Joined:
    May 3, 2007
    Posts:
    489
    Referrals:
    0
    Sythe Gold:
    0

    damien121 Forum Addict

    connect to website via txt box

    never mind :s i done it. instead of "Text1.text it was text1.text :s my mistake im really sorry guys
     
  9. Unread #5 - Jul 6, 2007 at 10:21 AM
  10. timk777
    Joined:
    Feb 19, 2007
    Posts:
    156
    Referrals:
    0
    Sythe Gold:
    0

    timk777 Active Member

    connect to website via txt box

    Edit your post next time. And its not hard.


    Command1_Click()
    Webbrowser1.navigate Text1.text
    End Sub


    Easy.. :p
     
  11. Unread #6 - Jul 6, 2007 at 1:23 PM
  12. Annex
    Joined:
    Aug 28, 2005
    Posts:
    2,324
    Referrals:
    3
    Sythe Gold:
    0
    UWotM8?

    Annex Ballin'
    Veteran (Ex-Admin)
    PHP Programmers Retired Administrator

    connect to website via txt box

    You only quote something when you want that exact text to show. IF you want the text from text1.text then you would use

    Private Sub Command1_Click()
    WebBrowser1.Navigate text1.text
    End Sub

    if you wanted a specific url it would be

    Private Sub Command1_Click()
    WebBrowser1.Navigate "www.url.here"
    End Sub
     
< Buying Multispaced name!! | xbox games >

Users viewing this thread
1 guest


 
 
Adblock breaks this site