JBTALKS.CC

标题: 关于vb.net的问题 [打印本页]

作者: kopi冰    时间: 2012-10-13 09:13 PM
标题: 关于vb.net的问题
Private Sub OpenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles OpenToolStripMenuItem.Click

Dim AllText As String = "", LineofText As String = ""
OpenFileDialog1.Filter = "text files(*.txt)|*.txt"
OpenFileDialog1.ShowDialog() 'display open dialog box
If OpenFileDialog1.FileName <> "" Then
Try 'open file and trap any errors using handler
FileOpen(1, OpenFileDialog1.FileName, OpenMode.Input)
Do Until EOF(1)
LineofText = LineInput(1)
AllText = AllText & LineofText & vbCrLf

Loop
label1.Text = OpenFileDialog1.FileName 'update label
TextBox1.Text = AllText
TextBox1.Enabled = True
TextBox2.Text = AllText
TextBox2.Enabled = True
TextBox3.Text = AllText
TextBox3.Enabled = True
TextBox4.Text = AllText
TextBox4.Enabled = True

OpenToolStripMenuItem.Enabled = False
Catch
MsgBox("ERROR opening file.")
Finally
FileClose(1)

*save的form


*open的form

为什么它会把全部字放在同一个textbox的?
要怎样才可以把它们放在原本的textbox?
求解阿!!!
作者: kopi冰    时间: 2012-10-14 12:43 PM
没人会吗??
求解阿!!!!!!!!!!!




欢迎光临 JBTALKS.CC (https://jbtalks.my/) Powered by Discuz! X2.5