- 分享
- 0
- 人气
- 0
- 主题
- 11
- 帖子
- 244
- UID
- 516134
- 积分
- 330
- 阅读权限
- 15
- 注册时间
- 2012-8-15
- 最后登录
- 2017-12-29
- 在线时间
- 1701 小时
    
|
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?
求解阿!!! |
|