如题,具体情况如下:
当我在[移动]按钮上点击鼠标时,label就向左移动,当我按住不放时,怎么让它也跟着不停的移动?

解决方案 »

  1.   

    在按钮的onmousedown时间里写代码
      

  2.   

    用timer控件控制label控件的移动
    在mousedown和mouseup事件中控制timer控件的开关
      

  3.   

    在窗口上加个按钮,再加个标签Option Explicit
    Dim bolMove As BooleanPrivate Sub Command1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
        bolMove = True
        MoveLabel
    End Sub
    Private Sub Command1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
        bolMove = False
    End SubPrivate Sub MoveLabel()
        While bolMove
            Label1.Move Label1.Left - 1
            DoEvents
        Wend
    End Sub