-
Drag Icons
I am using the built-in drag and drop functions in VB, and I want to change the icon to the NoDrop icon when it is over a frame, but when it is over a picturebox in the frame, I want it to back to what it orignally was. It's the hand that looks like it's grabbing somthing. Does anyone know how to do this? I thought there was a DragOverIcon property, but there isn't.
Thanks for any help
-Joey
-
Try this
Code:
Private Sub Frame1_DragOver(Source As Control, X As Single, Y As Single, State As Integer)
If Source.DragIcon = False Then
Source.DragIcon = LoadPicture("C:\Program Files\Microsoft Visual Studio\Common\GRAPHICS\ICONS\COMPUTER\W95mbx01.ico")
End If
If X <= 100 Or X + 100 >= Frame1.Width Or Y <= 100 Or Y + 100 >= Frame1.Height Then
Source.DragIcon = LoadPicture("")
End If
End Sub