For i = 1 To 300
If Len(Label1.Caption) >= 128 Then
Label2.Caption = Label2.Caption + "王"
End If
Label1.Caption = Label1.Caption + "王"
Next i
Label2.Left = Label1.Left + Label1.Width
Public Property Get Caption() As String
Caption = Text1.Text
End Property
Public Property Let Caption(ByVal vText As String)
Text1.Text = vText
End Property
Private Sub UserControl_Initialize()
Text1.Left = 0
Text1.Top = 0
End Sub
Private Sub UserControl_ReadProperties(PropBag As PropertyBag)
PropBag.ReadProperty "Caption", "Label1"
End Sub
Private Sub UserControl_Resize()
Text1.Height = UserControl.Height
Text1.Width = UserControl.Width
End Sub
Private Sub UserControl_WriteProperties(PropBag As PropertyBag)
PropBag.WriteProperty "Caption", Text1.Text, "Label1"
End Sub
Form1:
Private Sub Form_Load()
Dim i As Integer
UserControl11.Caption = ""
For i = 1 To 200
UserControl11.Caption = UserControl11.Caption + "我"
Next
End Sub