Ticket Q102850
Visible to All Users
Duplicate

FileAttachmentBase Drag Drop

created 17 years ago

Hi,
I am using the FileAttachmentBase to add files to a class in my project. Drag/Drop works great if I want to add a file from Windows Explorer. I want to be able to drag an attachment from Outlook and drop it into my application in the same way.
I have written and borrowed code to Drag/Drop from outlook as you can see in the attached sample project but I am having difficulty trapping the DragDrop event. The DragOver event works fine (although it seems that the AllowDrop is set to false after my code exists), but the DragDrop event is not trapped. If I drag and drop a file from Windows Explorer both events are trapped as expected.
Why is this?
Thanks,
Stephan

Show previous comments (1)

    Hi,
    Thanks for the info. My big problem at the moment however is that the DragDrop event does not fire in my code. Does your code suppress the event?
    Thanks,
    Stephan

    Dennis Garavsky (DevExpress) 17 years ago

      Hi Stephan,
      Thank you for the update. We are working on this problem and will post a solution once it is found. Please bear with us.
      Thanks,
      Dennis

      Dennis Garavsky (DevExpress) 17 years ago

        Hi Stephan,
        >>
        Does your code suppress the event?
        <<
        Yes, we have the following code in the FileAttachmentListViewController class:

        C#
        private void grid_DragOver(object sender, DragEventArgs e) { if(addFromFileAction.Active && e.Data.GetDataPresent(DataFormats.FileDrop)) { e.Effect = DragDropEffects.Copy; } else { e.Effect = DragDropEffects.None; } }

        It suppresses the dropping of the file. So, the only way to accomplish your task is to modify and recompile our sources.
        Thanks,
        Dennis

        Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

        Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.