Paramiters;
vb.net 2003
XP OS
I looked and cannot seem to find a way to display a file that is created by a vb app heres what I have.
First I create the file showme.txt
This on a button click event.
I needed to delete the file if it existed first
[code=vbnet]
If File.Exists(pat h1) Then
File.Delete(pat h1)
End If
sw = File.CreateText (path1)
[/code]
Then I added lots of text
[code=vbnet]
sw.WriteLine("W elcome to Show Me")
sw.WriteLine()
sw.WriteLine("H ere we will take the numbers you have entered and show")
sw.WriteLine("y ou how to add them to get an answer.")
sw.WriteLine()
sw.WriteLine("F irst lets get the sumbers you entered")
sw.WriteLine()
If length1 > 0 Then
sw.WriteLine((V al(AddBox1.Text )))
End If
If length2 > 0 Then
sw.WriteLine((V al(AddBox2.Text )))
End If
If length3 > 0 Then
sw.WriteLine((V al(AddBox3.Text )))
End If
If length4 > 0 Then
sw.WriteLine((V al(AddBox4.Text )))
End If
If length5 > 0 Then
sw.WriteLine((V al(AddBox5.Text )))
End If
' about 200 more lines follow with code to move the numbers arround ect...
[/code]
Then I flushed and closed it.
[code=vbnet]
sw.Flush()
sw.Close()
[/code]
Now how do I open it for the user to read immediately?
Everything writes and saves fine. I can open the file manually through explorer
but I need it to open immediately after it is finished being written to.
[code=vbnet]
' code to open the file for the user to read
[/code]
Any helpfull advice, links, ect would be greatly appreciated.
Thanks in advance,
Semajthewise
P.S. I'd prefer wordpad
vb.net 2003
XP OS
I looked and cannot seem to find a way to display a file that is created by a vb app heres what I have.
First I create the file showme.txt
This on a button click event.
I needed to delete the file if it existed first
[code=vbnet]
If File.Exists(pat h1) Then
File.Delete(pat h1)
End If
sw = File.CreateText (path1)
[/code]
Then I added lots of text
[code=vbnet]
sw.WriteLine("W elcome to Show Me")
sw.WriteLine()
sw.WriteLine("H ere we will take the numbers you have entered and show")
sw.WriteLine("y ou how to add them to get an answer.")
sw.WriteLine()
sw.WriteLine("F irst lets get the sumbers you entered")
sw.WriteLine()
If length1 > 0 Then
sw.WriteLine((V al(AddBox1.Text )))
End If
If length2 > 0 Then
sw.WriteLine((V al(AddBox2.Text )))
End If
If length3 > 0 Then
sw.WriteLine((V al(AddBox3.Text )))
End If
If length4 > 0 Then
sw.WriteLine((V al(AddBox4.Text )))
End If
If length5 > 0 Then
sw.WriteLine((V al(AddBox5.Text )))
End If
' about 200 more lines follow with code to move the numbers arround ect...
[/code]
Then I flushed and closed it.
[code=vbnet]
sw.Flush()
sw.Close()
[/code]
Now how do I open it for the user to read immediately?
Everything writes and saves fine. I can open the file manually through explorer
but I need it to open immediately after it is finished being written to.
[code=vbnet]
' code to open the file for the user to read
[/code]
Any helpfull advice, links, ect would be greatly appreciated.
Thanks in advance,
Semajthewise
P.S. I'd prefer wordpad
Comment