Drag & drop

Post your Gambas programming questions here.
Post Reply
bill-lancaster
Posts: 130
Joined: Tuesday 26th September 2017 3:17pm
Location: NW England

Drag & drop

Post by bill-lancaster » Saturday 01st May 2021 12:47pm

I can't see how to do this, it's probably very simple.
I have a picture box with a thumbnail of a photo. I want to place a copy of the file in a particular directory using drag n' drop
I don't want the drag.icon to be the picture because they are large images.
How best to show just a "+" image as the drag.icon in the _MouseDrag event?

bill-lancaster
Posts: 130
Joined: Tuesday 26th September 2017 3:17pm
Location: NW England

Re: Drag & drop

Post by bill-lancaster » Saturday 01st May 2021 2:30pm

OK, got it!

Code: Select all

Public Sub PictureBox1_MouseDrag()
  If Mouse.Left Then
    Drag.Icon = Picture["icon:/32/add"] 
    Last.Drag(Drag.Icon.Image)
  Endif
End

Post Reply