容器中的事件如何控制容器外的控件?
具体的:一个Form中有一个Picture Box, Picture Box中有一个按钮Command1, 在Form上还有一个Command2, 但是不在Picture Box中,如果我单击Command1, 想改变Command2的Caption属性,该如何做?说明白了吗?

解决方案 »

  1.   

    Private Sub Command1_Click()
        Command2.Caption = "test"
    End Sub直接写即可
      

  2.   

    哦,不好意思,我说错了:
    原意是Picture Box中有一个窗体Form2,单击Form2中的一个Command按钮,怎么改变含有Picture Box的Form中的Command2的Caption属性?为了表达清楚,想简单一点说,没想到说的太简单了,呵呵,不好意思~~~
      

  3.   

    Picture Box中有一个窗体Form2?这是什么意思啊?
    Private Sub Command1_Click()
        form.Command2.Caption = "test"
    End Sub
      

  4.   

    //原意是Picture Box中有一个窗体Form2,单击Form2中的一个Command按钮,怎么改变含有Picture Box的Form中的Command2的Caption属性?这样:
    form1.command2.Caption="test"