蛊虫进入人体的图片:vb小问题

来源:百度文库 编辑:高考问答 时间:2024/04/30 09:08:45
帮我解释一下:
Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Call Image1_Click
End If
End Sub

Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
'在text2文本框里按下回车
Call Image1_Click
'调用Image1_Click 单击子程序
End If
End Sub

当按下回车的时候就执行 Image1_Click

在text2文本框里输入 回车(回车的值是13) 调用image1 单击子程序

键盘上的每一个键都有一个对应的KeyAscii 13代表回车