for i=0 to 3
Set lblObj = Controls.Add("VB.textbox", "Ll" & i)
    With lblObj
       .Visible = True
       .Width = 2000
       .Height = 500
       .Top = 500 + i * 2000 + 2000 + 50
       .Left = 500 + i * 2000
       .Caption = "字符串" & i
       .Font = "宋体"
       .FontSize = 20
       .Alignment = 2
       .ForeColor = &HC00000
    End With
next

解决方案 »

  1.   

    创建两个控件数组,一组Label用于显示,一组TextBox用于输入。将文章分别装入每一个Label中。
      

  2.   

    关键问题是我不知道如何把一篇文章分开装入几个LABEL,请指教
      

  3.   

    你要分什么文章呢,文本文件吗?这个比较容易一点,如果是word呀什么的就不好说了…
      

  4.   

    我不知道是我没看懂你的问题还是我没写清楚。根据条件动态加载你所需要的控件就可以了。如下是加载图片和label控件:(前面我写的代码把caption改成text,写错了。)
    Option Explicit
    Private WithEvents imageObj As Image
    Private WithEvents lblObj As Label
    Private Sub cmdDisplay_Click()
    Dim i As Integer
    For i = 0 To 2
        Set imageObj = Controls.Add("VB.Image", "Image" & i)
        With imageObj
           .Visible = True
           .Width = 2000
           .Height = 2000
           .Top = 500 + i * 2000
           .Left = 500 + i * 2000
           .BorderStyle = 1
           .Stretch = True
           .Picture = LoadPicture(App.Path + "\Image_" & i & ".jpg")
        End With
        
        Set lblObj = Controls.Add("VB.Label", "Label" & i)
        With lblObj
           .Visible = True
           .Width = 2000
           .Height = 500
           .Top = 500 + i * 2000 + 2000 + 50
           .Left = 500 + i * 2000
           .Caption = "图片" & i
           .Font = "宋体"
           .FontSize = 20
           .Alignment = 2
           .ForeColor = &HC00000
        End With
    Next
    End Sub
    Private Sub Form_Load()
        Me.Width = 7000
        Me.Height = 7500
        Me.Top = 50
        Me.Left = 1000
    End Sub
      

  5.   

    是文本文件
    谢谢boybluesky(boybluesky)  怎么给分?