Results 1 to 3 of 3

Thread: vb 7.0 open/save

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2001
    Location
    seattle, WA
    Posts
    13

    vb 7.0 open/save

    how should i use open/save dialog boxes with loading in html files in vb 7.0 beta 2? i just am wanting to dump them into a text box

  2. #2
    Frenzied Member numtel's Avatar
    Join Date
    Apr 2000
    Location
    CA
    Posts
    1,163
    Just call their properties, you can't expect to use a default property of a property though.

  3. #3
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649
    Here's a quick example using the System.IO namespace
    VB Code:
    1. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    2.     Dim fs As System.IO.FileStream
    3.     Dim sr As System.IO.StreamReader
    4.     With OpenFileDialog1
    5.         If .ShowDialog() = DialogResult.OK Then
    6.             fs = .OpenFile
    7.             sr = New System.IO.StreamReader(fs)
    8.             TextBox1.Text = sr.ReadToEnd()
    9.         End If
    10.     End With
    11. End Sub
    Best regards

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