怎样用VB创建一个空的TXT文件?
答案:4 悬赏:0 手机版
解决时间 2021-04-05 22:35
- 提问者网友:原来太熟悉了会陌生
- 2021-04-05 01:37
怎样用VB创建一个空的TXT文件?
最佳答案
- 五星知识达人网友:行雁书
- 2021-04-05 03:08
一加载窗口就在指定的路径创建一个空文本文件:
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
张志晨
全部回答
- 1楼网友:酒者煙囻
- 2021-04-05 05:08
一加载窗口就在指定的路径创建一个空文本文件:
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
- 2楼网友:荒野風
- 2021-04-05 04:35
private sub command1_click()
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
我想一加载窗口就创建一个文件,该怎么弄呢?
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
我想一加载窗口就创建一个文件,该怎么弄呢?
- 3楼网友:由着我着迷
- 2021-04-05 03:58
Open "c:\1.txt" For Binary As #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啊,这我就帮不了你了,对不起。追问没事,不过还是得谢谢你!
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啊,这我就帮不了你了,对不起。追问没事,不过还是得谢谢你!
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯