单选题
VB
题号 #2536766
在窗体上先后画2个图片框,名称分别为Picture1和banana,banana 中添加了香蕉图片,如图1所示,且将banana.Drag Mode 属性设置为1。要求程序运行时,可以用鼠标把banana 拖拽到Picture1中,如图2所示。能实现此功能的事件过程是( )。

参考答案
C
答案解析
Drag Mode 属性返回或设置一个值,确定在拖放操作过程中所使用的是手动还是自动拖动方式,当属性设置为1(自动方式)时,控件不能正常响应鼠标事件,在拖放操作过程中,当鼠标器指针在一个目标对象或窗体上时,单击鼠标会对目标对象产生DragDrop 事件。而source .move 是控件移动,picture1.left +x 图片当前位置加鼠标X 位置,picture1.top +y 图片当前高度位置加鼠标Y的位置即把图片移动到picture1.left +x,picture1.top +y位置。
你可能感兴趣的试题
A.15
B.13
C.11
D.9
A.Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii =13Then
回车符的ASCII 码是13
a=Val(Text1)
If a >=0Or a <=100Then
Text2 . SetFocus
Else
Text1 . SetFocus :MsgBox ("分数错")
End If
End If
End Sub
If KeyAscii =13Then
回车符的ASCII 码是13
a=Val(Text1)
If a >=0Or a <=100Then
Text2 . SetFocus
Else
Text1 . SetFocus :MsgBox ("分数错")
End If
End If
End Sub
B.Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii =13Then 回车符的ASCII 码是13
a=Val(Text1)
If a >=0And a <=100Then
Text1 . SetFocus
Else
Text2 . SetFocus :MsgBox ("分数错")
End If
End If
End Sub
If KeyAscii =13Then 回车符的ASCII 码是13
a=Val(Text1)
If a >=0And a <=100Then
Text1 . SetFocus
Else
Text2 . SetFocus :MsgBox ("分数错")
End If
End If
End Sub
C.Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii =13Then 回车符的ASCII 码是13
a=Val(Text1)
If a <0And a >100Then
Text2 . SetFocus
Else
Text1 . SetFocus :MsgBox ("分数错")
End If
End If
End Sub
If KeyAscii =13Then 回车符的ASCII 码是13
a=Val(Text1)
If a <0And a >100Then
Text2 . SetFocus
Else
Text1 . SetFocus :MsgBox ("分数错")
End If
End If
End Sub
D.Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii =13Then 回车符的ASCII 码是13
a=Val(Text1)
If a >=0And a <=100Then
Text2.SetFocus
Else
Text1.SetFocus :MsgBox ("分数错")
End If
End If
End Sub
If KeyAscii =13Then 回车符的ASCII 码是13
a=Val(Text1)
If a >=0And a <=100Then
Text2.SetFocus
Else
Text1.SetFocus :MsgBox ("分数错")
End If
End If
End Sub
A.计算矩阵外围一圈元素的累加和
B.计算矩阵除外围一圈以外的所有元素的累加和
C.计算矩阵第1列和最后一列元素的累加和
D.计算矩阵第1行和最后一行元素的累加和
