[单项选择题] 在窗体上先后画2个图片框,名称分别为Picture1和banana, banana中添加了香蕉图片(见图一)banana .Drag Mode属性设置为1。要求程序运行时,可以用鼠标把 banana拖拽到Picture中(见图二)能实现此功能的事件过程是【 】
A.Private Sub Form_ Drag Drop ( Source As Contro1,X as single ,Y As Single )banana. Move Picture1.left+X,Picture.Top+Y End Sub
B.Private Sub banana_ Drag Drop(Source As Control,X As Single ,Y As Singe ) SOURCE. Move Picture1.left+X,Picture.Top+Y End Sub
C.Private sub Picture1 Drag Drop(Source As Control,X As Single,Y As Single)
D.Private Sub Picture1_ Drag Drop(Source As Control,X As Single,Y As Single)
正确答案:C
参考解析:首先拖动的是banana,所以程序代码中的源控件是banana,又因为是将banana拖拽到Picturel中,所以应在Picturel的DragDrop过程中编写代码。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)