a) priate sub form_dragdrop(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.left+x.picture1.top+y
end sub
c) b)private sub picture1_dragdrop(source as control,x as single,y as single )
source.move picture1.left+x.picture1.top+y
end sub
d) b)private sub picture1_dragdrop(source as control,x as single,y as single )
banana.move banana.left+x, banana.top+y
end sub
(33)在窗体上画1个名称mand1的命令按钮,然后编写如下事件过程
option base 1
pribate submand1_click()
dim a(5.5) as integer
for i=1 to 5
a(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
程序运行后,单击命令按钮,输出结果是(a)
a) 15
b)13
c)11
d)9
(34)在窗体上从左到右有text1、text2两个文本框(见图),要求程序运行时,在text1中输入1个分数后按回车键,则判断分数的合法性,若分数为0~100中的1个数,周围光标移到text2中;否则光标不动,并弹出对话框显示“分数错”,下面程序中正确的是(d)
a)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
(35)在窗体上画2个命令按钮,名称分别mand1mand2,并编写如下程序
const n=5,m=4
dim a(m,n)
private submand1_click()
k=1
for i=1 to m
for j=1 to n
a(i,j)=k
k=k+1
next j
next i
private submand2_click()
summ=0
for i=1 to m
for j=1 to n
if i=1 or i=m then
summ=summ+a(i,j)
else
if j=i or j=n then
summ=summ+a(i,j)
end if
end if
next j
next i
print summ
end sub
过mand1_click()的作用是二维数组a 中存放1个 m行n列的矩阵;过mand2_click()的作用是(a)
a) 计算矩阵外围一圈元素的累加和
b) 计算矩阵除外一圈以外的所有元素的累加和
c) 计算矩阵第1列和最后一列元素的累加和
d) 计算矩阵第1行和最后一行元素的累加和 www.gaofen123.com
+《2008年4月计算机等级考试二级VB考试真题(1)》相关文章
- 2008年4月计算机等级考试二级VB考试真题(1)
- › 2008年报关员统一考试商品归类试题
- › 2008年报关员资格全国统一考试试卷B及答案(1)
- › 2008年报关员资格全国统一考试试卷A及答案(1)
- › 2008年报关员全国统一考试试题A卷答案
- › 2008教师资格考试心理学题库概念题试题精选
- › 2008年山东省教师资格考试教育学试题(回忆版)
- 在百度中搜索相关文章:2008年4月计算机等级考试二级VB考试真题(1)
- 在谷歌中搜索相关文章:2008年4月计算机等级考试二级VB考试真题(1)
- 在soso中搜索相关文章:2008年4月计算机等级考试二级VB考试真题(1)
- 在搜狗中搜索相关文章:2008年4月计算机等级考试二级VB考试真题(1)