Results 1 to 4 of 4

Thread: Drop & drag

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jul 2000
    Location
    Yugoslavia
    Posts
    16

    Thumbs down

    How to make the drop & drag effect, that is visible only on my app as well as outside of it.

  2. #2
    Guest
    What is it that you want to drag? Controls? Files? your Form? Please explain.

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Jul 2000
    Location
    Yugoslavia
    Posts
    16
    I would like it to be like dragging a control (not to drag a control, just to look like it), but not only in my app. If I use the built-in Drag method of a control it shows a 'no no' sign whenever mouse slides out of the container(form), and I can't fix that.

  4. #4
    Guest
    See if this works.
    Code:
    Dim OldX As Single
    Dim OldY As Single
    
    Private Sub Picture1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
        If Button = 1 Then
            OldX = X
            OldY = Y
        End If
    End Sub
    
    Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
        If Button = 1 Then Picture1.Move Picture1.Left + (X - OldX), Picture1.Top + (Y - OldY)
    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