load arr(i)
arr(i).visible=truei为你要添加的控件数组的index号
=================
共同学习,共同进步

解决方案 »

  1.   

    Load arr(i+1)
    arr(i+1).Left = 
    arr(i+1).Top = 
    arr(i+1).Width = 
    arr(i+1).Height = 
    arr(i+1).Caption = arr(i+1).Visible = True
    Form1.Refresh
      

  2.   

    '按空格生成控件
    Private Sub Form_KeyPress(KeyAscii As Integer)
    Static i As Long
        If KeyAscii = 32 Then
            Load Command1(i + 1)
            Command1(i + 1).Visible = True
            Command1(i + 1).Top = 0
            Command1(i + 1).Left = Command1(i).Left + 500
            i = i + 1
        End If
    End SubPrivate Sub Form_Load()
        Me.KeyPreview = True
     End Sub
      

  3.   

    首先将控件的index值设为0,然后:
    load arr(i)
    arr(i).visible=true
      

  4.   

    '试试下面的代码在form上放个Frame1 设置index 为 0Dim i As LongPrivate Sub Command1_Click()
        Load Frame1(i + 1)
        Frame1(i + 1).Visible = True
        Frame1(i + 1).Caption = "Frame" & (i + 2)
        Frame1(i + 1).Left = Frame1(i).Left + Frame1(i).Width
        i = i + 1
    End SubPrivate Sub Command2_Click()
        If i > 0 Then
            Unload Frame1(i)
            i = i - 1
        End If
    End Sub
      

  5.   

    '加载Option控件
    Private Sub Command1_Click()
      t = Option1.Count
      Load Option1(t+1)
    Option1(1).Left = Left
    Option1(1).Top = Top
    Option1(1).Visible = True
    End Sub