VB中如果将print的结果显示在文本框中?
PrivateSubForm_Click()Dimi%,j%,S%StaticAAsStringPrint"------乘法口诀表--------"PrintFori=1...
Private Sub Form_Click()
Dim i%, j%, S%
Static A As String
Print "------乘法口诀表--------"
Print
For i = 1 To 9
For j = 1 To i
S = i * j
Print i & "×" & j & "=" & S,
Next j
Print
Next i
End Sub
如何将print产生的最终结果显示在text1.text中,我始终只能做到显示最后一句或最先一句 展开
Dim i%, j%, S%
Static A As String
Print "------乘法口诀表--------"
For i = 1 To 9
For j = 1 To i
S = i * j
Print i & "×" & j & "=" & S,
Next j
Next i
End Sub
如何将print产生的最终结果显示在text1.text中,我始终只能做到显示最后一句或最先一句 展开
4个回答
展开全部
'要选设Text1.MultiLine 属性为True
Private Sub Form_Click()
Dim jl As String
Dim i%, j%, S%
Static A As String
jl = "------乘法口诀表--------" & Chr(13) & Chr(10)
For i = 1 To 9
For j = 1 To i
S = i * j
jl = jl & Chr(13) & Chr(10) & i & "×" & j & "=" & S & Chr(13) & Chr(10)
Next j
Next i
Text1.Text = jl
End Sub
Private Sub Form_Click()
Dim jl As String
Dim i%, j%, S%
Static A As String
jl = "------乘法口诀表--------" & Chr(13) & Chr(10)
For i = 1 To 9
For j = 1 To i
S = i * j
jl = jl & Chr(13) & Chr(10) & i & "×" & j & "=" & S & Chr(13) & Chr(10)
Next j
Next i
Text1.Text = jl
End Sub
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
print不行,那是古代的终端程序的输出。
Private Sub Form_Click()
Dim i%, j%, S%
Static A As String
A = "------乘法口诀表--------"
a = a & vbCrLf
For i = 1 To 9
For j = 1 To i
S = i * j
a = a & i & "×" & j & "=" & S,
Next j
a = a & vbCrLf
Next i
me.Text1.Text = a
End Sub
Private Sub Form_Click()
Dim i%, j%, S%
Static A As String
A = "------乘法口诀表--------"
a = a & vbCrLf
For i = 1 To 9
For j = 1 To i
S = i * j
a = a & i & "×" & j & "=" & S,
Next j
a = a & vbCrLf
Next i
me.Text1.Text = a
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
将乘法表显示在text1.text中
Private Sub Form_Load()
Dim i%, j%, S%
Dim A As String, b As String
A = "------乘法口诀表--------" & vbCrLf
For i = 1 To 9
For j = 1 To i
S = i * j
Print i & "×" & j & "=" & S,
b = CStr(i) & "×" & CStr(j) & "=" & CStr(S)
A = A & b & Space$(8 - Len(b))
Next j
A = A & vbCrLf
Next i
Text1.Text = A
End Sub
Private Sub Form_Load()
Dim i%, j%, S%
Dim A As String, b As String
A = "------乘法口诀表--------" & vbCrLf
For i = 1 To 9
For j = 1 To i
S = i * j
Print i & "×" & j & "=" & S,
b = CStr(i) & "×" & CStr(j) & "=" & CStr(S)
A = A & b & Space$(8 - Len(b))
Next j
A = A & vbCrLf
Next i
Text1.Text = A
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
Private Sub command1_Click()
Static s As String
Dim m As String
Cls
For i = 0 To 2 Step 1
For j = 0 To 2 Step 1
s = Text1(i) & Text2(j)
m = m & " " & s & " " & Chr(13) & Chr(10)
Next
Next
Text3 = m
End Sub
Static s As String
Dim m As String
Cls
For i = 0 To 2 Step 1
For j = 0 To 2 Step 1
s = Text1(i) & Text2(j)
m = m & " " & s & " " & Chr(13) & Chr(10)
Next
Next
Text3 = m
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询