在窗体上从左到右有Text1、Text2两个文本框(见图),要求运行程序时在Text1中输入—个分数后按回车键,则判断分数的合法性,若分数为0~100中的—个数,则光标移到Text2中;否则光标不动,并弹出对话框“分数错”。下面程序中正确的是()。
A. Private Sub Text1_KeyPress(KeyAscii As Intege IfKeyAscii=13 Then '回车符的ASCII码是13 a=Va1(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 Intege IfKeyAscii=13 Then '回车符的ASCII码是13 a=Val(Text1) Ifa>=0 And a<=100 Then Text1.SetFocus Else Text2.SetFocus : MsgBox("分数错") End If End If End Sub
C. Private Sub Text1_KeyPress(KeyAscii As Intege IfKeyAscii=13 Then '回车符的ASCII码是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 Intege IfKeyAscii=13 Then '回车符的ASCII码是13 a=Val(Text1) If a>=0 And a<=100 Then Text2.SetFocus Else Text1.SetFocus : MsgBox("分数错") End If End If End Sub
查看答案
在清末新政中,清政府最终决定自( )年起停止一切科举考试。至此,在中国延续了一千多年 .的科举考试制度终于被废除了。
A. 1904年
B. 1905年
C. 1906年
D. 1907年
“会当凌绝顶,—览众山小”是对泰山的真实写照,它出自( )。
A. 王维
B. 杜甫
C. 李白
D. 杜牧
企业缴纳基本养老保险费,一般不得超过企业工资总额的( )
A. 10%
B. 15%
C. 20%
D. 25%
下面可以正确定义两个整型变量和—个字符串变量的语句是()。
A. Dim n,m As Integer,s As String
B. Dim a%,b$,c As String
C. Dim a As Integer,b,c As String
Dim x%,y As Integer,z As String