Results 1 to 2 of 2

Thread: Drag Icons

  1. #1

    Thread Starter
    PowerPoster MidgetsBro's Avatar
    Join Date
    Oct 2000
    Location
    Apparently, Internet.com
    Posts
    3,125

    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
    <removed by admin>

  2. #2
    Lively Member sjwesley's Avatar
    Join Date
    Sep 2001
    Location
    UK
    Posts
    73
    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
    A time to love, and a time to hate; a time of war, and a time of peace - Ec:3:8

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