大家好!我是VB的初学者,我有一个问题请大伙帮忙解决一下:
新建个按钮后,如何设定在按下该按钮显示一些文字!

解决方案 »

  1.   

    command_onclick
     command.caption="hello"
    end sub
      

  2.   

    把代码写在Command_MouseDown过程里
      

  3.   

    对不起!我不太懂!麻烦大伙看看我这样写对不对:
    Private Sub Command1_MouseDown()
    Command1.Caption = "hello"
    End Sub
      

  4.   

    你上面的代码不对正确的:Private Sub Command1_Click()
    Command1.Caption = "hello"
    End SubMouseDown事件处理过程的签名不符,真要放在MouseDown里面,就得这样:Private Sub Command1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    Command1.Caption = "hello"
    End Sub
      

  5.   

    Private Sub Command1_MouseDown()
    msgbox "hello world",vbinformation,"hello world"
    End Sub