Drag and drop functionality in List Box in c#
<p>I am using list box control. I am able to drag and drop files in the list box. I have added the following code for the above.</p>

<pre><code> private void lstPDFFiles_DragEnter(object sender, DragEventArgs e)
    {
        //int i;
        if (e.Data.GetDataPresent(DataFormats.FileDrop))
            e.Effect = DragDropEffects.All;
        else
            e.Effect = DragDropEffects.None;

    }

    private void lstPDFFiles_DragDrop(object sender, DragEventArgs e)
    {
        string[] s = (string[])e.Data.GetData(DataFormats.FileDrop, false);
        int i;
        for (i = 0; i &lt; s.Length; i++)
             lstPDFFiles.Items.Add(s[i]);

    }
</code></pre>

<p>This much of code allows me to drag and drop 1 file in the list box. But now i also want to allow the user to drag and drop a folder. How do i do this . Thanx a lot in advanced. Please help.</p>
