|登录 |注册

查看: 995|回复: 1
打印 上一主题 下一主题

关于vb.net的问题

[复制链接]
kopi冰
2012-10-13 09:13 PM
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 |联系我们 |隐私政策 |Share

GMT+8, 2025-2-22 06:19 PM , Processed in 0.099683 second(s), 24 queries .

Powered by Discuz! X2.5 © 2001-2012 Comsenz Inc.

本论坛言论纯属发表者个人意见,与本论坛立场无关
Copyright © 2003-2012 JBTALKS.CC All Rights Reserved

Dedicated Server powered by iCore Technology Sdn. Bhd.

合作联盟网站:
JBTALKS 马来西亚中文论坛 | JBTALKS我的空间 | ICORE TECHNOLOGY SDN. BHD.
回顶部