) Private Sub Text1__KeyPress ( KeyAscii AS Integer ) If KeyAscii=13 Then ‘ 回车符的 ACSII 码是 13 a=Val ( Text1 ) If a>=0 or a<=100 Then Text2.SetFocus Else Text1. SetFocus : MsgBox ( “ 分数错 ” ) End If End If End Sub
B.
) Private Sub Text1__KeyPress ( KeyAscii AS Integer ) If KeyAscii=13 Then ‘ 回车符的 ACSII 码是 13 a=Val ( Text1 ) If a>=0 And a<=100 Then Text1.SetFocus Else Text2. SetFocus : MsgBox ( “ 分数错 ” ) End If End If End Sub
C.
) Private Sub Text1__KeyPress ( KeyAscii AS Integer ) If KeyAscii=13 Then ‘ 回车符的 ACSII 码是 13 a=Val ( Text1 ) If a<0 And a>100 Then Text2.SetFocus Else Text1. SetFocus : MsgBox ( “ 分数错 ” ) End If End If End Sub
D.
) Private Sub Text1__KeyPress ( KeyAscii AS Integer ) If KeyAscii=13 Then ‘ 回车符的 ACSII 码是 13 a=Val ( Text1 ) If a>=0 And a<=100 Then Text2.SetFocus Else Text1. SetFocus : MsgBox ( “ 分数错 ” ) End If End If End Sub
Private Sub Text1__KeyPress(KeyAscii AS Integer) If KeyAscii=13 Then ‘回车符的ACSII码是13 a=Val(Text1) If a>=0 or a<=100 Then Text2.SetFocus Else Text1. SetFocus MsgBox(“分数错”) End If End If End Sub
B.
Private Sub Text1__KeyPress(KeyAscii AS Integer) If KeyAscii=13 Then ‘回车符的ACSII码是13 a=Val(Text1) If a>=0 And a<=100 Then Text1.SetFocus Else Text2. SetFocus MsgBox(“分数错”) End If End If End Sub
C.
Private Sub Text1__KeyPress(KeyAscii AS Integer) If KeyAscii=13 Then ‘回车符的ACSII码是13 a=Val(Text1) If a<0 And a>100 Then Text2.SetFocus Else Text1. SetFocus MsgBox(“分数错”) End If End If End Sub
D.
Private Sub Text1__KeyPress(KeyAscii AS Integer) If KeyAscii=13 Then ‘回车符的ACSII码是13 a=Val(Text1) If a>=0 And a<=100 Then Text2.SetFocus Else Text1. SetFocus MsgBox(“分数错”) End If End If End Sub
【单选题】窗体如图1所示。要求程序运行时,在文本框Text1中输入一个姓氏,单击“删除”按钮(名称为Command1),则可删除列表框List1中所有该姓氏的项目。若编写以下程序来实现如此功能: Private Sub Command l Click( ) Dim n%,k% n=Len(Text1.Text) For k=0 To List1.ListCount-1 If Left(List1.List(...