Public pword As String
Private Sub Command1_Click() Text2.Text = pword pword = "" End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer) If KeyAscii >= 65 And KeyAscii <= 122 Then pword = pword + Chr$(KeyAscii) KeyAscii = 42 End If End Sub
Private Sub Text1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) If Button = 1 Then Text1.Text = "" Text2.Text = "" End If End Sub
Private Sub Text2_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) If Button = 1 Then Text1.Text = "" Text2.Text = "" End If End Sub
Private form1_load() command1.caption="显示密码" label1.caption="请输入密码" label2.caption="密码为" text1.text="" text2.text="" end sub
在文本框里输入abcd回车调用command1_click()事件该怎么做呀? 我在文本框输入abcd后再按回车,光标就在文本框里换行了没有调用command1_click()事件