鼠标背后的物体滞后

时间:2014-03-10 17:40:17

标签: vb.net

下面的Label1左右移动。我怎么能让它滞后并“赶上”鼠标指针?

Private xpos as integer = 10 

    Private Sub me_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles PictureBox1.Paint



        Dim lbl As New label
        lbl.Size = New System.Drawing.Size(xpos, 100)

        end sub 

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick

        lbl1.Location = New Point(MyPictureBox.PointToClient(New Point(MousePosition.X, 0)).X, 100)

0 个答案:

没有答案