0

I need to access the icon's image and its properties when the icon is dropped onto a form.

I have tried variations of e.Data.GetData(DataFormats.FileDrop) but that only provides me with the text for the .lnk.

My drop routine is:

    private void listBox1_DragDrop(object sender, DragEventArgs e)
    {
      Array dataObjects = (Array)e.Data.GetData(DataFormats.FileDrop);
      for (int i = 0; i < dataObjects.Length; ++i)
      {
        string fileName = dataObjects.GetValue(i).ToString();
        listBox1.Items.Add("String value: " + fileName);
      }
    }

The results look something like String value: I:\folder\ico.lnk

I need to access the properties associated with the icon: target type, target location, starting, Shortcut key, etc.

0 Answers0