找考题网-背景图
未分类题

在窗体上有—个名称为Text1的文本框和一个名称为Command1的命令按钮,要求在程序执行时,每单击命令按钮—次,文本框向右移动—定的距离。下面能够正确实现上述功能的程序是 ______。
A.Private Sub Command1_Click() Text1.Left=100 End Sub
B.Private Sub Command1_Click() Text1.Left=Text1.Left-100 End Sub
C.Private Sub Command1_Click() Text1.Move Text1.Left+100 End Sub
D.Private Sub Command1_Click() Text1.Move Text1.Left End Sub

A.Private
B.Left=100
C.Private
D.Left=Text1.Left-100
E.Private
F.Move
G.Left+100
H.Private
I.Move
J.Left

【参考答案】

C
解析:Left属性是用来指定控件左边缘的位置。选项A是设置Text1的左边距是100,选项B是每单击命令按钮一次,文本框向左移动一定距离。Move是用来移动窗体或控件,并可改变其大小。形式为:[对象].Move左边距离[,上边距离[,宽度[,高度]]]。左边距离、上边距离、宽度、高度:如...

(↓↓↓ 点击‘点击查看答案’看完整答案 ↓↓↓)
热门试题