作者hamsters (hamster)
看板Visual_Basic
标题Re: [.NET] 有关print出来的问题..请各位帮忙 谢谢~
时间Mon Jun 13 00:20:42 2005
※ 引述《fancies (N )》之铭言:
: Private Sub btnPrint_Click(ByVal sender As System.Object, ByVal e As
: System.EventArgs) Handles btnPrint.Click
: Dim index As Integer = 0
: For index = 0 To intArrayname.GetUpperBound(0)
: If intArrayname(index) <> "" Then
: TextBox1.Text = intArrayname(index) & ControlChars.CrLf
: MsgBox(intArrayname(index))
: End If
: Next
: For index = 0 To intArraytel.GetUpperBound(0)
: If intArraytel(index) <> "" Then
: TextBox2.Text = intArraytel(index) & ControlChars.CrLf
: End If
: Next
: End Sub
: End Class
: 这段程式我是要把Array里面的东西印出来..可是我却都只有印出最後一个资料..
: 老师教的是& ControlChars.CrLf就是会变成下一行..不知道是哪边出了问题 谢谢~
更新 TextBox 文字时要将原有的文字保留下来,所以
TextBox1.Text = intArrayname(index) & ControlChars.CrLf
改成:
TextBox1.Text = TextBox1.Text & intArrayname(index) & ControlChars.CrLf
TextBox2.Text = intArraytel(index) & ControlChars.CrLf
改成:
TextBox2.Text = TextBox2.Text & intArraytel(index) & ControlChars.CrLf
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.114.217.31
1F:推 fancies:谢谢..我去试试看~~ 59.104.31.59 06/13