我试过了,可以添加到25个的,至于你为什么只能添加17个,可能是有很多的被你给遮住了。我用的是VB6.0SP5 
不过,一般情况下,控件数组都是在程序里用
if n>image.count then load image(n)来进行添加的

解决方案 »

  1.   

    If i = 0 Then
    Image1(0).Visible = True
    Image1(i).Width = 2355
    Image1(i).Height = 1770
    Image1(i).Visible = True
    cap.EditCopy
    Image1(i).Picture = Clipboard.GetData
    Image1(i).Width = 2355
    Image1(i).Height = 1770
    Image1(i).Stretch = True
    Image1(i).Top = 50 + i * 2000 'Image1(i - 1) + i * 2000\
    i = i + 1
    ElseIf i <> 0 Then
    On Error GoTo loadimageeror
    Load Image1(i)
    loadimageeror:
    If Err.Number = 360 Then
    Unload Image1(i)
    Load Image1(i)
    End If
    Image1(i).Width = 2355
    Image1(i).Height = 1770
    Image1(i).Visible = True
    cap.EditCopy
    Image1(i).Picture = Clipboard.GetData
    Image1(i).Width = 2355
    Image1(i).Height = 1770
    Image1(i).Stretch = True
    Image1(i).Top = 50 + i * 2000 'Image1(i - 1) + i * 2000
    Picture1.Height = Picture1.Height + 1800
    Label11.Caption = i
    i = i + 1
    End If
    大家看这段代码为什么加载到17个时提示我溢出有什么办法解决呀
      

  2.   


    '////If i = 0 Then
    for j=i+1 to 20
       WITH Image1(j)
    .Visible = True
    .Width = 2355
    .Height = 1770
    .Visible = True
    .Picture = Clipboard.GetData
    .Stretch = True
    .Top = 50 + i * 2000 'Image1(j - 1) + j * 2000
    cap.EditCopy
       end with
    next
    ================================================================ok?
      

  3.   

    '////If i = 0 Thenfor j=i+1 to 20
        WITH Image1(j)
            Load Image1(i)
            .Visible = True
            .Width = 2355
            .Height = 1770
            .Visible = True
            .Picture = Clipboard.GetData
            .Stretch = True
            .Top = 50 + i * 2000 'Image1(j - 1) + j * 2000
            cap.EditCopy
       end with
    next================================================================ok?
      

  4.   

    你这样是一次加载来21个image1的控件,我的意思是每单击一下command1才添加一个