答案:'其实不需要command,你可以把Text1_Change事件去除,结果是一样的
Private Sub Command1_Click()
Label1.Caption = Text1
End Sub
Private Sub Form_Load()
Text1 = 111
End Sub
Private Sub Text1_Change()
Label1.Caption = Text1
End Sub
其他:不需按钮时,是通过text_change()事件实现的。即楼上的回答是正解。
如果非要通过按钮,可以如下:
Private Sub Command1_Click()
Label1.Caption = Text1.textEnd Sub
上一个:VB6.0中,在TEXT控件输入文字,按下ENTER键后,如何代替command1的onclick事件?
下一个:VB证书不可用,怎么回事?