我做了Label1控件的caption属性的字符串移动的方法全部读取的过程, 问题是caption的字符串较少的时候都可以。但是过多时,其后的部分不能显示出来了 caption的字符串能允许多少字符串呢 什么方法能够解决呢
解决方案 »
- 如何隐藏DOS窗口
- 汉字字符串转成汉语拼音头字母,汉字以外的字符不变,求代码。
- 大家认为学网络编程的,要不要学接口技术这课呀?
- 在VB6中,如何判断网页http://www.btophr.com/common/userto.asp已经打开或存在。又如何通过VB代码自动关闭它。
- 调试的时候完全正确,编译出来的程序却是错误的!什么原因?
- VB中使用了Datacombo,编译后发现,下拉选择一个选项后,该选项总是覆盖了第一个选项,如何解决该问题?
- 急:一个关于ADO和Datagrid的问题的连接
- 无限网络传感器和串口编程
- vb6中的winsock控件的问题
- 如何通过软件把一个别人的屏保程序改变成一个非屏保程序
- the specified procedure could not be found
- 请问vb可以写asp网页吗?那个dhtml或者iis工程是干什么的?
Dim i As Long
For i = 1 To 1000
Text1.Text = Text1.Text & i & "aaaaaaaaaabbbbbbbbbb"
Next i
Label1.BackStyle = 0 '透明标签
Label1.AutoSize = True
Label2.BackStyle = 0 '透明标签
Label2.AutoSize = True
' Picture1.ScaleMode = 3 '象素座标
' Me.ScaleMode = 3
Label1.Caption = Mid(Text1.Text, j + 1, 200)
j = j + 200
Label2.Caption = Mid(Text1.Text, j + 1, 200)
Label2.Left = Label1.Left + Label1.Width
Timer1.Enabled = True
End SubPrivate Sub Timer1_Timer()
Label1.Left = Label1.Left - 2000
Label2.Left = Label2.Left - 2000
If Label1.Left + Label1.Width < 0 Then
Label1.Left = Label2.Left + Label2.Width
If j + 200 >= Len(Text1.Text) Then
Label1.Caption = Mid(Text1.Text, j + 1, 200) & Left(Text1.Text, 200 - (Len(Text1.Text) - j))
j = 200 - (Len(Text1.Text) - j)
Else
Label1.Caption = Mid(Text1.Text, j + 1, 200)
j = j + 200
End If
End If
If Label2.Left + Label2.Width < 0 Then
Label2.Left = Label1.Left + Label1.Width
If j + 200 >= Len(Text1.Text) Then
Label2.Caption = Mid(Text1.Text, j + 1, 200) & Left(Text1.Text, 200 - (Len(Text1.Text) - j))
j = 200 - (Len(Text1.Text) - j)
Else
Label2.Caption = Mid(Text1.Text, j + 1, 200)
j = j + 200
End If
End If
End Sub