首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
设窗体上有一个标签Label1,并编写了下面的过程 Private Sub Form_MouseMove(Button As Integer,Shift As Integer,_ X As Single,Y As Single) If B
设窗体上有一个标签Label1,并编写了下面的过程 Private Sub Form_MouseMove(Button As Integer,Shift As Integer,_ X As Single,Y As Single) If B
admin
2016-06-30
21
问题
设窗体上有一个标签Label1,并编写了下面的过程
Private Sub Form_MouseMove(Button As Integer,Shift As Integer,_
X As Single,Y As Single)
If Button=1 Then
Labell=”X=”&X&”Y=”& Y
End If
End Sub
程序运行后的效果是( )。
选项
A、当按下鼠标左键并移动鼠标时,鼠标的位置坐标会同步显示在标签中
B、当按下鼠标右键并移动鼠标时,鼠标的位置坐标会同步显示在标签中
C、当移动鼠标时,鼠标的位置坐标会同步显示在标签中
D、当按下鼠标左键时,鼠标的位置坐标会同步显示在标签中
答案
A
解析
MouseMove意鼠标移动。本题中指移动鼠标光标事件过程
Sub Form_MouseMove(Button As Integer,Shift As Integer,X As Single,Y As Single)
End Sub
上述事件过程适用于窗体和大多数控件,包括复选框、命令按钮、单选按钮、框架、文本框、目录框、文件框、图像框、图片框?、标签、列表框等。
移动鼠标事件过程参数,其含义如下:
①Button:被按下的鼠标键,可以取3个值,如表2.2所示:
②Shift:表示Shift、Ctrl、Alt的状态。
③x、y鼠标光标的当前位置。
本题中使用if语句判断Button是否等于1,即判断是否按下了鼠标左键,若,,则将鼠标光标的x,Y坐标值显示在标签Labell上。故选项A正确。
转载请注明原文地址:https://jikaoti.com/ti/OuJ0FFFM
本试题收录于:
二级VB题库NCRE全国计算机二级分类
0
二级VB
NCRE全国计算机二级
相关试题推荐
窗体上有一个命令按钮,命令按钮的单击事件过程如下:PrivateSubCommand1_Click()Dima a=Array(1,2,3,4,5) Fork=1To4 s=s+a(k)
有如下程序:PrivateSubForm_Click()DimiAsInteger,SumAsInteger Sum=0 Fori=2To10 IfiMod2=0AndiMo
VisualBasic程序设计采用的编程机制是
执行如下程序段后,intsum的值为______。PrivateSubCommand1_Click() sum=0 Fori=1To18Step2 Forj=2To6 If(i
设用复制、粘贴的方法建立了一个命令按钮数组Command1,以下对该数组的说法错误的是
下面的数组声明语句中正确的是
以下程序代码实现单击命令按钮Command1时生成20个(0,100)之间的随机整数,存于数组中,打印数组中大于50的数,并求这些数的和。PrivateSubCommand.Click()Dimarr(1To20)For
使用ReDim/Preserve可以改变数组()。
以下程序的功能是将多维数组a(1Tom,1Ton)中的元素转移到一个名为b(1Ton*m)的一维数组中,完成该程序。OptionBase1PrivateSubCommand1_Click(IndexAsInteger)
函数过程Fun1的功能是:如果参数b为奇数,则返回值为1,否则返回值为0。FunctionFun1(bAsInteger) if______Then Fun1=0 Else Fun1=1
随机试题
巨噬细胞产生的主要细胞因子是
己知z=xy2e-x2y,求
A.低血糖B.胃肠道反应C.水肿D.心律失常胰岛素治疗糖尿病的不良反应主要是
下列关于CT薄层扫描的叙述,正确的是
脑出血以内囊出血最常见,其特征性的临床表现为
对犯罪分子只能判一种主刑;对同一犯罪行为只能在主刑之后判处一个或两个以上的附加刑。()
“劣币驱逐良币”规律发生在()。
①在利益的驱使下,行业内滋生了“流量至上”甚至“流量造假”等现象,亟待规范和引导。②互联网和社交媒体的升级迭代、文化娱乐产业的蓬勃发展,成为“粉丝经济”兴起的深厚土壤。③理性对待粉丝热情、引导粉丝合理消费,同时将明星效应转化为提升商业品牌知名度的契机,
给定资料 1.截至2013年11月13日,已有21个省(区、市)正式公布了2014年高考加分的相关政策和信息。与往年相比,2014年高考加分项目整体缩减,加分分值也相应降低。而其中广东加分改革政策力度较大,加分项目将由23项减为6项,缩减74%;同时大
出席学术讨论会的有三个足球爱好者,四个亚洲人,两个日本人,五个商人。以上叙述涉及了所有晚会参加者,其中日本人不经商。那么,参加晚会的人数是:
最新回复
(
0
)