c# - New Outlook: Dragging attachments returns empty FileDrop array - Stack Overflow

admin2025-04-18  0

Its about the new Outlook for windows, often referenced as "Outlook (new)", and dragging an attachement directly from an E-Mail into a Dropzone.

Actually we are using a Windows Forms drop zone with the "DragDrop" event handler:

   private void MainForm_DragDrop(object sender, DragEventArgs e)
    {
        try
        {
            if (e.Data.GetDataPresent(DataFormats.FileDrop))
            {
                string[] files = (string[])e.Data.GetData(DataFormats.FileDrop);
                {

While this works well from within the "old" Outlook or e.g. for a file dragged from the windows explorer, there is a problem, when dragging an attachment from within the new outlook.

The event is still beeing fired, and "e.Data.GetDataPresent(DataFormats.FileDrop)" returns a TRUE. "e.Data.GetData(DataFormats.FileDrop)" however delivers an empty array. No array elements - no files ...

Thanks for your help!

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1744932029a275214.html

最新回复(0)