5 个解决方案
#1
public Sub time_stop() '文件写入
FileOpen(1, "time.txt", OpenMode.Output)
Write(1, hour)
Write(1, min)
Write(1, sec)
dim stl="e:\xyz\333.mp3"
Write(1, stl)
FileClose(1)
End Sub
FileOpen(1, "time.txt", OpenMode.Output)
Write(1, hour)
Write(1, min)
Write(1, sec)
dim stl="e:\xyz\333.mp3"
Write(1, stl)
FileClose(1)
End Sub
#2
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim sr As IO.StreamWriter = New IO.StreamWriter("tmp.txt", False, System.Text.Encoding.Default)
With sr
.WriteLine("A")
.WriteLine("B")
.WriteLine("C")
End With
sr.Close()
End Sub
Dim sr As IO.StreamWriter = New IO.StreamWriter("tmp.txt", False, System.Text.Encoding.Default)
With sr
.WriteLine("A")
.WriteLine("B")
.WriteLine("C")
End With
sr.Close()
End Sub
#3
此示例在指定的路径创建空文本文件。
示例
Dim file As System.IO.FileStream
file = System.IO.File.Create("c:\test.txt")
http://msdn.microsoft.com/library/chs/default.asp?url=/library/chs/dv_vbCode/html/vbtskCodeExampleRunningProgram.asp
示例
Dim file As System.IO.FileStream
file = System.IO.File.Create("c:\test.txt")
http://msdn.microsoft.com/library/chs/default.asp?url=/library/chs/dv_vbCode/html/vbtskCodeExampleRunningProgram.asp
#4
Dim Sw As StreamWriter = File.CreateText("c:\test.txt")
Sw.WriteLine("插入一行字符")
Sw.Write("插入字符")
Sw.Close()
#5
同意所有
#1
public Sub time_stop() '文件写入
FileOpen(1, "time.txt", OpenMode.Output)
Write(1, hour)
Write(1, min)
Write(1, sec)
dim stl="e:\xyz\333.mp3"
Write(1, stl)
FileClose(1)
End Sub
FileOpen(1, "time.txt", OpenMode.Output)
Write(1, hour)
Write(1, min)
Write(1, sec)
dim stl="e:\xyz\333.mp3"
Write(1, stl)
FileClose(1)
End Sub
#2
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim sr As IO.StreamWriter = New IO.StreamWriter("tmp.txt", False, System.Text.Encoding.Default)
With sr
.WriteLine("A")
.WriteLine("B")
.WriteLine("C")
End With
sr.Close()
End Sub
Dim sr As IO.StreamWriter = New IO.StreamWriter("tmp.txt", False, System.Text.Encoding.Default)
With sr
.WriteLine("A")
.WriteLine("B")
.WriteLine("C")
End With
sr.Close()
End Sub
#3
此示例在指定的路径创建空文本文件。
示例
Dim file As System.IO.FileStream
file = System.IO.File.Create("c:\test.txt")
http://msdn.microsoft.com/library/chs/default.asp?url=/library/chs/dv_vbCode/html/vbtskCodeExampleRunningProgram.asp
示例
Dim file As System.IO.FileStream
file = System.IO.File.Create("c:\test.txt")
http://msdn.microsoft.com/library/chs/default.asp?url=/library/chs/dv_vbCode/html/vbtskCodeExampleRunningProgram.asp
#4
Dim Sw As StreamWriter = File.CreateText("c:\test.txt")
Sw.WriteLine("插入一行字符")
Sw.Write("插入字符")
Sw.Close()
#5
同意所有