在窗体上画—今名称为Cmmand1的命令按钮,然后编写如下事件过程 Option Base 1 Private Sub Command1_Click() Dim a(5,5)As Integer For i=1 To 5 For j=1 To 5 a(i,j)=(i+j)*5\10 Next j Next i s=0 For i=1 To 5 s=s+a(i,i) Next i Print s End Sub
查看答案
Paragraph 4 tells us that when visiting a foreign country, ______.
A. it is very uncommon for one to encounter embarrassing situations
B. it is hard for one to adapt to the material aspects of life there
C. people often expect to meet differences in customs
D. people expect the same kind of food and weather
在窗体上先后画两个图片框,名称分别为Picture1和banana,banana中添加了香蕉图片(见图1),且将bananA、DragMode属性设置为1。要求程序运行时,可以用鼠标把banana拖曳到Picttne1中(见图2)。能实现此功能的事件过程是______。
A. Private Sub Form_DlagDrop(Source As Control,X As Single,Y As Single) bananA、Move Picture1.Left+X,Picture1.Top+Y End Sub
B. Private Sub banana_DragDrop(Source As Control,X As Single,Y As Single) SourcE.Move Picture1.Lefi+X,Picture1.Top+Y End Sub
C. Private Sub Picture1_DmgDrop(Source As Contro1,X As Single,Y AS Single) SourcE.Move Picture1.Left+X,Picture1.Top+Y End Sub
D. Private Sub Picture1_DragDrop(Source As Control,X As Single,Y As Single) bananA、Move bananA、Let+X,banan.Top+Y End Sub
【C7】
A. measure
B. register
C. grade
D. weigh
在窗体上从左到右有Text1、Text2两个文本框(见图),要求运行程序时在Text1中输入—个分数后按回车键,则判断分数的合法性,若分数为0~100中的—个数,则光标移到Text2中;否则光标不动,并弹出对话框“分数错”。下面程序中正确的是______。
A. Private Sub Text1_KeyPress(KeyAscii As Integer) 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 Integer) 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 Integer) 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 Integer) 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