Results 1 to 3 of 3

Thread: drag and drop "image" from frame to main form

  1. #1

    Thread Starter
    Addicted Member messup000's Avatar
    Join Date
    Jun 2005
    Posts
    181

    drag and drop "image" from frame to main form

    ok so HOW would I drag and drop an "image" control from frame to main form while running the program???

    Thanks

    messup000

  2. #2
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Re: drag and drop "image" from frame to main form

    Without going into much details (including presize position addjustments) here is the general idea:
    Code:
    Option Explicit
    
    Private Sub Image1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
        Image1.Drag vbBeginDrag
    End Sub
    
    Private Sub Form_DragDrop(Source As Control, X As Single, Y As Single)
        Image1.Drag vbEndDrag
        Set Image1.Container = Me '<<<--- this is the main key
        Image1.Move X, Y
    End Sub

  3. #3
    Addicted Member senthilkumartd's Avatar
    Join Date
    Feb 2005
    Posts
    206

    Re: drag and drop "image" from frame to main form

    thanks

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