怎样用VB创建一个空的TXT文件?
展开全部
一加载窗口就在指定的路径创建一个空文本文件:
Public Class Form1
Dim path As String = ""d:\zzc.txt ""
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim file As System.IO.FileStream
file = System.IO.File.Create(path)
End Sub
End Class
软件:VB2010
张志晨
Public Class Form1
Dim path As String = ""d:\zzc.txt ""
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim file As System.IO.FileStream
file = System.IO.File.Create(path)
End Sub
End Class
软件:VB2010
张志晨
展开全部
Open "c:\1.txt" For Binary As #1
Close #1
Close #1
更多追问追答
追问
Public Class frm_Main
Private Sub frm_Main_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Open "c:\1.txt" For Binary As #1
Close #1
End Sub
End Class
我想一加载窗口就创建一个文件
追答
哦,原来不是VB6啊,这我就帮不了你了,对不起。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
private sub command1_click()
open app.path & "\1.txt" for output as #1
print #1, text1
close #1
end sub
open app.path & "\1.txt" for output as #1
print #1, text1
close #1
end sub
追问
Public Class frm_Main
Private Sub frm_Main_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Open "c:\1.txt" For Binary As #1
Close #1
End Sub
End Class
我想一加载窗口就创建一个文件,该怎么弄呢?
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
一加载窗口就在指定的路径创建一个空文本文件:
Public Class Form1
Dim path As String = ""d:\zzc.txt ""
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim file As System.IO.FileStream
file = System.IO.File.Create(path)
End Sub
Public Class Form1
Dim path As String = ""d:\zzc.txt ""
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim file As System.IO.FileStream
file = System.IO.File.Create(path)
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |