Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
C# Helper...
 
XML RSS Feed
Follow VBHelper on Twitter
 
 
MSDN Visual Basic Community
 
 
 
 
 
 
TitleDisplay the HTML code at a URL
KeywordsWeb page, WebBrowser, browser, HTML
CategoriesControls
 
Use the InternetTransfer control's OpenURL method to download the URL's contents and display them in a TextBox.

Note that this program cancels any pending download when it Unloads.

 
Private Sub cmdShowText_Click()
Dim response As Variant

    MousePointer = vbHourglass
    txtResult.Text = ""
    DoEvents

    ' Open the URL.
    response = inetDesiredURL.OpenURL(txtURL.Text)

    ' Display the response.
    txtResult.Text = response

    MousePointer = vbDefault
End Sub

' Cancel any pending commands.
Private Sub Form_Unload(Cancel As Integer)
    inetDesiredURL.Cancel
End Sub
 
 
Copyright © 1997-2010 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated