控件数组的响应事件无效,翻了很多帖子还是没有头绪,请帮忙!class module
Option ExplicitPrivate WithEvents mShape As Shape
Public Property Set MsShape(ByVal vData As Shape)
    Set mShape = vData
End Property
Public Property Get MsShape() As Shape    Set MsShape = mShape
End PropertyPrivate Sub mShape_Click()
MsgBox mShape.Name
End Sub
调用:
Public Sub CreateShape(i As Integer)Set a(i) = New Class1Set a(i).MsShape = Controls.Add("VB.Shape", "oShape" & i, Form1)a(i).MsShape.Visible = True
a(i).MsShape.Left = 5000
a(i).MsShape.Top = 5000
a(i).MsShape.Width = 1000
a(i).MsShape.Height = 1000End Sub
控件显示出来了,但是捕捉不到任何事件!急!请帮忙!谢谢!

解决方案 »

  1.   

    同志,Shape没有事件!
    如果是你作的,应加上事件,并且名称不要与现行系统的重复!
      

  2.   

    Shape控件没有事件啊。即使不是控件数组,单个的Shape 也没有事件。
      

  3.   

    http://community.csdn.net/Expert/topic/3938/3938646.xml?temp=.2606623
    http://community.csdn.net/Expert/topic/3830/3830890.xml?temp=7.906741E-02
    http://community.csdn.net/Expert/topic/3856/3856528.xml?temp=.3105585
    http://community.csdn.net/Expert/topic/3875/3875079.xml?temp=.1331903
    http://community.csdn.net/Expert/topic/3906/3906790.xml?temp=.9179346
    http://community.csdn.net/Expert/topic/4078/4078914.xml?temp=.8830225
    http://community.csdn.net/Expert/topic/4091/4091065.xml?temp=.5120508
    http://community.csdn.net/Expert/topic/4163/4163245.xml?temp=1.737612E-02
    http://community.csdn.net/Expert/topic/4138/4138263.xml?temp=.3854181
    http://community.csdn.net/Expert/topic/4135/4135278.xml?temp=4.314601E-03
    http://community.csdn.net/Expert/topic/4132/4132133.xml?temp=.8277399
    http://community.csdn.net/Expert/topic/4102/4102825.xml?temp=.3572809
    http://community.csdn.net/Expert/topic/4100/4100444.xml?temp=.3572809
    http://community.csdn.net/Expert/TopicView.asp?id=3812799
    http://community.csdn.net/Expert/topic/3722/3722976.xml?temp=.5472986
    http://community.csdn.net/Expert/TopicView.asp?id=3717277
    http://community.csdn.net/Expert/TopicView.asp?id=3710464
    http://community.csdn.net/Expert/topic/3629/3629571.xml?temp=.7908899
    http://community.csdn.net/Expert/topic/3536/3536511.xml?temp=.4289514
    http://community.csdn.net/Expert/topic/3388/3388278.xml?temp=.2183802
    http://community.csdn.net/Expert/TopicView.asp?id=3336113
    http://community.csdn.net/Expert/topic/3265/3265830.xml?temp=.2758753全部是讲动态控件的。