不可能的呀,Index是数组下标

解决方案 »

  1.   

    sub pic_dbclick()
    select case index
    case 0
    ...case 2...
    case 3
    ...end select不知道这样行不行?
    行的话给我点分,要不我提问不了了!
      

  2.   

    没有什么不可能啊,程序能自动生成动态控件啊,就只对其一些点击事件不响应啊。
    但像mousemove事件却响应啊。。我为些郁闷了两天了。。
      

  3.   

    回zhoujianfengren:不行啊,它对Click事件都没响应怎会执行你后面写的条件语句呢。我都只简单的加上:label1.caption=index都没反应。。555555
      

  4.   

    Private Sub picBox_Click(Index As Integer)
      select case index
         case 0
         case 1
           .
           .
           .
      end select 
    end sub
      

  5.   

    我建议你把变量的数目放在函数变量中
    Private Sub CreatPic(ConCou As Integer) 
      Load picBox(ConCou) 
     With picBox(ConCou) 
      .Visible = True 
      .Enabled = True 
      .Caption = "图片控件" & ConCou
     End With 
    End Sub 
      

  6.   

    Option Explicit
    Dim Cou As IntegerPrivate Sub CreatPic()
      Cou = Cou + 1
      Load picBox(Cou)
      With picBox(Cou)
        .Visible = True
        .Enabled = True
        Print "图片控件" & Cou
      End With
    End SubPrivate Sub Command1_Click()
        CreatPic
    End SubPrivate Sub picBox_Click(Index As Integer)
        Debug.Print "click"
    End Sub'运行是可以响应事件的
      

  7.   

    Option Explicit
    Dim Cou As IntegerPrivate Sub CreatPic()
      Cou = Cou + 1
      Load Picbox(Cou)
      With Picbox(Cou)
        .Visible = True
        .Enabled = True
        .Left = Cou * 1000
        '.Caption = "图片控件" & Cou--------->picbox没该属性
      End With
    End SubPrivate Sub Command1_Click()
    CreatPic
    Picbox_Click (Cou)
    End SubPrivate Sub Form_Load()
    Cou = 0
    End SubPrivate Sub Picbox_Click(Index As Integer)
    MsgBox Picbox(Index).Left
    End Sub
      

  8.   

    创建好PictureBox后要设置坐标
    要不然所有的PictureBox叠在一起