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

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