|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
A drag and drop problem in Outlook and .NetHi:
I want to drag a mail item from Outlook and drop it in to a listbox. Then the listbox will display the name of the mail item. However this code string[] files = (string[])e.Data.GetData(DataFormats.FileDrop); gives files=null. So how can I do Drag & Drop with Outlook and .NET? Is this very hard one? Thank you for any help, Dennis Huang You have to use the appropriate data format. FileDrop is not the right thing. That drops a list of files
that are located on the system. Emails are most likely copied in several ways. First is probably the text of the email, then an HTML format, probably an OLE Automation format, and some other things. Play around with the other data formats because that is where you are going to find your email being stored. "BVM" <Denn***@TBH.com.au> wrote in message news:ODh9$6B0EHA.3336@TK2MSFTNGP11.phx.gbl... I want to drag a mail item from Outlook and drop it in to a listbox. Then the listbox will display the name of the mail item. However this code Hi: string[] files = (string[])e.Data.GetData(DataFormats.FileDrop); gives files=null. So how can I do Drag & Drop with Outlook and .NET? Is this very hard one? Thank you for any help, Dennis Huang |
|||||||||||||||||||||||