If you have a control set to allowdrop, then the dragover event will fire when you 
drag something over it.  In the event, you should say what kind of drop you allow and 
that will change the icon.  
such as...

    Private Sub ucTDFrame_DragEnter(ByVal sender As Object, ByVal e As 
System.Windows.Forms.DragEventArgs) Handles MyBase.DragEnter
        e.Effect = DragDropEffects.Copy
    End Sub


Then you do what you want in the DragDrop event such as...

    Private Sub ucTDFrame_DragDrop(ByVal sender As Object, ByVal e As 
System.Windows.Forms.DragEventArgs) Handles MyBase.DragDrop
        Dim HierarchySysID As Long
          Dim oTree As New TreeView()
        Dim oNode As HierarchyUI.HierachyNode
        Dim s() As String

        s = e.Data.GetFormats()
        Select Case s(0)
            Case typeNameHere.
                        oTree = e.Data.GetData(s(0))
                        oNode = oTree.SelectedNode
                        DoStuffHere....
        End Select
    End Sub

-----Original Message-----
From: Arulraja Koildason [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 29, 2002 4:23 PM
To: [EMAIL PROTECTED]
Subject: [DOTNET] Drag and Drop in C#


Hi,

I have a requirement like draging a listitem from a listview control to
another Windows forms propertyGrid Control.

I have a pbm dragging  over the listitem out of listview control. Can
anybody help me to fix this pbm.

I really appreciate ur help.

Thanks
Livi




_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to