Results 1 to 9 of 9

Thread: open HTML file [resolved]

Threaded View

  1. #5

    Thread Starter
    New Member
    Join Date
    Mar 2004
    Posts
    7
    ook.. I try to read text from a text file and it works, but i don't know how to open a html file or read to display the content of the html file through the htmlviewer, can you reply the technique or code that you thinking? thanks alot

    Private Sub btnGo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnGo.Click
    ' show a wait cursor
    Cursor.Current = Cursors.WaitCursor

    ' load HTML from the supplied URL
    'viewer.DisplayText(GetHTMLFromURL(txtURL.Text))

    Dim sr As StreamReader = New StreamReader("TestFile.txt")
    Dim line As String

    line = sr.ReadLine()
    sr.Close()

    viewer.DisplayText(line)

    End Sub

    --> created a text file name TestFile, input some text in it. When the GO button is press, the message inside the TestFile will be display out. Please ignore the url field.
    Last edited by xiaofei; Mar 19th, 2004 at 10:42 PM.

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