Hello,

I ran a search on drag and drop but didn't quiet find what I was looking for:

I have 2 Pictureboxes where images are already preloaded into.
However, if needed I will have to rearrange where each picture is (swapping)

So if I click and drag the image from picturebox1 to picturebox2, I'd like the images to swap places; picturebox1's image get's dropped into picturebox2, and picturebox2's image get's dropped into picturebox1.

So far, if I did the above example... picturebox1's image replaces picturebox2's image.

Here's what I got:

VB Code:
  1. Private Sub Picture2_DragDrop(Source As Control, X As Single, Y As Single)
  2.  
  3.       Picture2.Picture = Source.Picture
  4.       Set Source.Picture = Nothing
  5.  
  6. End Sub
  7.  
  8. Private Sub Picture4_DragDrop(Source As Control, X As Single, Y As Single)
  9.  
  10.       Picture4.Picture = Source.Picture
  11.       Set Source.Picture = Nothing
  12.  
  13. End Sub

Any solutions to this problem?

Thanks

Chris