sytn.net
当前位置:首页 >> print Chr 13 >>

print Chr 13

chr(10)表示换行,chr(13)表示回车

1.Print "5" & Chr(13) & Chr(10) & "7" 换了一行.2.Print "5" & Chr(10) & Chr(13) & "7" 换了两行.第一个因为Chr(13)+Chr(10)(等价于vbCrLf)为标准的换下一行,所以只换一行.第二个为非标准的,Chr(10)和Chr(13)顺序相反,他们的

chr(10)就是ASCII中10代表的字符"换行",Chr(13)代表"回车",所以 这一行的结果就是:ab也可以用VB的常量VbCrLf代表换行和回车,你的字符串可以表示成:a & VBCRLF & b更简单.

Private Sub Command1_Click()Dim j As IntegerPrint Chr(13)For i = 65 To 72Print Space(i - 61) & String(16 - 2 * (i - 65), Chr(i))NextEnd Sub上面是VB6.0的代码,运行成功

看i是什么了print是显示 chr是函数,看代码预计i是数字0-9显示的结果也是0-9以下为对应表 Chr("0") 为0的字符 Chr("1") Chr("2") Chr("3") Chr("4") Chr("5") Chr("6") Chr("7") 响铃 Chr("8") 回格 Chr("9") tab(水平制

chr(13)+chr(10) 就是回车换行, 在文件中读取一个数出来之后,换一行,再读另一个数,直到读取玩为止,再显示到文本框中. 13 是回车的ascii码,10是换行的ascii码.

MSGBOX函数理解有误,该函数返回的是按钮的值,因此将MSGBOX改为INPUTBOX即可

答案:485Public Sub CountGT13() Dim i As Long Dim r As Long Dim s As Long Dim t As Long Dim n As Long n = 0 For i = 100 To 999 r = Int(i / 100) s = Int((i - r * 100) / 10) t = Int((i - r * 100 - s * 10)) If r + s + t > 13 Then n = n + 1 End If Next iEnd Sub

Private Sub Command1_Click() Dim i, max, min, sum, a(100) As Integer Randomize For i = 1 To 100 a(i) = Int(Rnd * 101) If i = 1 Then min = a(i): max = a(i) If max < a(i) Then max = a(i) If min > a(i) Then min = a(i) sum = sum + a(i) Print a(i); If i Mod

打印图形(用ASCII码打回车)Private Sub Command1_Click()Print " "; " "; "*"; Chr(13); " "; "*#*"; Chr(13); "*###*"End Sub Private Sub Form_Load()Command1.Width = Form1.Width * 0.75Command1.Left = (Form1.Width -

网站首页 | 网站地图
All rights reserved Powered by www.sytn.net
copyright ©right 2010-2021。
内容来自网络,如有侵犯请联系客服。zhit325@qq.com