VB写的程序,可以在form
load事件中..
shell
"1.exe",1
,注意后面的参数.
以一个项目为基础,在其工程上点右键,选添加,现有项,然后选择另外两个项目里的文件,用这种方式把所有的都添加上就行了
在你要引入的文件或文件夹上点右键,选包括在项目中
下次直接追问,要不我看不到
Private Sub Command1_Click()
'将源文件中的内容导入目标文件中
Open "D:\1.txt" For Append As #1 '打开目标文件
Print #1, temp
Wend
Close #1
End Sub
你需要先弄一个文本框
Dim OpenFileDialog As New OpenFileDialog
Dim f As System.IO.FileStream
Dim r As System.IO.StreamReader
OpenFileDialog.Filter = "文本文件(*.txt)|*.txt|所有文件(*.*)|*.*"
If (OpenFileDialog.ShowDialog() = System.Windows.Forms.DialogResult.OK) Then
Dim FileName As String = OpenFileDialog.FileName
f = New System.IO.FileStream(FileName, IO.FileMode.Open, IO.FileAccess.Read)
r = New System.IO.StreamReader(f)
TextBox1.Text += r.ReadToEnd
r.Close()
End If
另一个按钮保存 TextBox1.Text
Dim w As System.IO.StreamWriter
Dim FileName As String
If (SaveFileDialog.ShowDialog(Me) = System.Windows.Forms.DialogResult.OK) Then
FileName = SaveFileDialog.FileName
f = New System.IO.FileStream(FileName, IO.FileMode.Create, IO.FileAccess.Write)
w = New System.IO.StreamWriter(f)
w.Write(textbox.Text)
w.Close()
以追加方式打开student I.dat
以只读方式打开另外两个文件,
然后用循环把读读到的,写入
student I.dat文件.
以上就是土嘎嘎小编为大家整理的vb.net两文件合并相关主题介绍,如果您觉得小编更新的文章只要能对粉丝们有用,就是我们最大的鼓励和动力,不要忘记讲本站分享给您身边的朋友哦!!