|
-
May 10th, 2006, 04:04 PM
#1
Thread Starter
New Member
[02/03] How do I use Open statement?
How do I do the following?
Open (TextBox1.Text) for Output as #1
Print "Hello World "+(TextBox2.Text), #1
Close #1
Thanx.
Is the syntax of VB Studio.Net very different from Classical VB?
Last edited by pcpage4; May 10th, 2006 at 04:05 PM.
Reason: 1
-
May 10th, 2006, 04:08 PM
#2
Re: [02/03] How do I use Open statement?
yes, they have vastly improved file IO in .NET
VB Code:
Dim SWriter As System.IO.StreamWriter
Try
SWriter = New System.IO.StreamWriter(textbox1.Text)
SWriter.WriteLine("Hello World " & textbox2.text)
Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
If Not SWriter Is Nothing Then
SWriter.Close()
SWriter = Nothing
End If
End Try
-
May 10th, 2006, 04:36 PM
#3
Thread Starter
New Member
Re: [02/03] How do I use Open statement?
I have alot to learn. Thank you.
Last edited by pcpage4; May 10th, 2006 at 04:45 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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|