|
-
Mar 26th, 2003, 08:56 PM
#1
Thread Starter
Fanatic Member
Image Drag
How can I drag an image over another, so it just kind of "gives" it's picture to the one it's dragged on (and then it comes back to it's original position, but with nothing in it, since it gave the picture that was in it to the other one)... I don't know if you get what I'm saying....
"A RESPECTED scientist has put forward the stunning - if unsavoury - possibility that humans are descended from sewage dumped overboard by aliens."
"First we read that we are the creation of God, then scientists say we are descended from apes. Now they say we're some sort of alien poo. How much further can we sink?"
- Robert Matthews, Science Correspondent
-
Mar 26th, 2003, 11:25 PM
#2
Fanatic Member
Re: Image Drag
Originally posted by Alien_poo
How can I drag an image over another, so it just kind of "gives" it's picture to the one it's dragged on (and then it comes back to it's original position, but with nothing in it, since it gave the picture that was in it to the other one)... I don't know if you get what I'm saying....
I think I do...
Stick 3 PictureBox on your form and load an image inside pic 2 and 3.
Drag picturbox2 or picturebox3 over picturebox1 and it should do what you want. 
Picture 1 will be your target PictureBox in this case.
You can also do the same with image controls.
Hope this helps!
VB Code:
Private Sub Form_Load()
Picture2.DragMode = vbAutomatic
Picture3.DragMode = vbAutomatic
End Sub
Private Sub Picture1_DragOver(Source As Control, X As Single, Y As Single, State As Integer)
If Source.Picture = 0 Then Exit Sub
Picture1.Picture = Source.Picture
Source.Picture = Nothing
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|