窗体上已有1个名称为Picturel的图片框,要求实现下面2个功能之一:(1)在窗体上移动鼠标时,立即将Picturel显示在鼠标位置(2)在窗体上单击鼠标时,立即将Picturel显示在鼠标位置下面不能实现上述任何功能的事件过程是

admin2020-01-02  39

问题 窗体上已有1个名称为Picturel的图片框,要求实现下面2个功能之一:(1)在窗体上移动鼠标时,立即将Picturel显示在鼠标位置(2)在窗体上单击鼠标时,立即将Picturel显示在鼠标位置下面不能实现上述任何功能的事件过程是

选项 A、Private Sub Form_MouseDown(Button As Integer,Shift As Integer,X As Single,Y As Single)
    Picturel.Move X,Y
    End Sub
B、Private Sub Form_MouseUp(Button As Integer,Shift As Integer,X As Single,Y As Single)
    Picturel.Move X,Y
    End Sub
C、Private Sub Form_MouseDown(Button As Integer,Shift As Integer,X As Single,Y As Single)
    Picture 1.CurrentX=X:Picture 1.CurrentY=Y
    End Sub
D、Private Sub Form MouseMove(Button As Integer,Shift As Integer,X As Single,Y As Single)
    Picturel.Move X,Y
    End Sub

答案C

解析 图片框的CurrentX和CurrentY属性会在程序运行时,返回或设置下一次打印或绘图位置的水平坐标和垂直坐标。Move方法用于移动窗体或控件,其语法:对象名.Move Left[Top】[,Width][Height]。其中,Left和Top参数分别表示对象左侧的水平坐标和上侧的垂直坐标,Width和Height参数分别表示对象新的宽度和高度。
转载请注明原文地址:https://kaotiyun.com/show/gETp777K
0

最新回复(0)