Results 1 to 2 of 2

Thread: How to drag pictures during RunTime

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Nov 2000
    Location
    USA
    Posts
    28
    How do you drag pictures during runtime????

  2. #2
    Guest
    To move a picture:

    Code:
    Dim oldX As Long, oldY As Long, isMoving As Boolean
    
    Private Sub Picture1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    oldX = X
    oldY = Y
    isMoving = True
    End Sub
    
    Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    If isMoving Then
        Picture1.Top = Picture1.Top - (oldY - Y)
        Picture1.Left = Picture1.Left - (oldX - X)
    End If
    End Sub
    
    Private Sub Picture1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
    isMoving = False
    End Sub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width