Drag & drop from outside to a custom region of OL

Add-in Express™ Support Service
That's what is more important than anything else

Drag & drop from outside to a custom region of OL
 
May Wolfgang


Guest


Hello,

I am trying to develop a custom region, where I have such a tree view. And I want to be able to drag & drop files there. I already drag&drop messages from OL Explorer and it works.
But from outside(from Desktop, or any system folder) does not work.
It work if I use the combination of keys, CTRL +C(to copy), CTRL + P(paste) if the selection is there, in my custom form.
Also I tried to drag&drop a message from outside to the Outlook explorer, but does not work.
Is there any possibility to make it work ?
Thank you!
Posted 03 Nov, 2019 15:28:38 Top
Andrei Smolin


Add-in Express team


Posts: 18825
Joined: 2006-05-11
Hello Wolfgang,

I assume you need to study the data format(s) that you receive in the IDataObject parameter and handle the format(s) required.


Andrei Smolin
Add-in Express Team Leader
Posted 04 Nov, 2019 03:36:08 Top
May Wolfgang


Guest


Maybe you did not understand me.

I have an ADXOlForm docked in the right side of the OL Explorer. In this form I have a TreeView. If I drag a message from the message in the list, it works. The file is copied and everything is ok. Also, if I try to copy/paste a file from outsite of OL using the keybord shortcuts, it works.

But when I try to drag&drap the file, the DragDrop event of the treeview does not fire.
I have tried also to drag&drop a file to the OL Explorer. (this is possible?; which event I should use for this purpose?).
Posted 04 Nov, 2019 14:50:21 Top
Andrei Smolin


Add-in Express team


Posts: 18825
Joined: 2006-05-11
Hello Wolfgang,

Yes, I may misunderstand you.

I can't reproduce this issue. I have an ADXOlFrom with a tree view on it. The tree view has AllowDrop = true.

private void treeView1_DragDrop(object sender, DragEventArgs e)
{
    System.Diagnostics.Debug.WriteLine("!!! treeView1_DragDrop");
}

private void treeView1_DragEnter(object sender, DragEventArgs e)
{
    e.Effect = DragDropEffects.Copy;
}



Andrei Smolin
Add-in Express Team Leader
Posted 05 Nov, 2019 05:43:24 Top
May Wolfgang


Guest


I just sent you a sample test to the support email to see what I am talking about.
Posted 05 Nov, 2019 07:42:22 Top
Andrei Smolin


Add-in Express team


Posts: 18825
Joined: 2006-05-11
Hello Wolfgang,

Thank you for the test project. It works for me. I register the add-in project, start Outlook and test the drag-n-drop functionality: it works producing the debug message as expected. It doesn't work if I press {F5} to start Outlook from an elevated IDE. I assume this is the elevation that doesn't let you work. You can bypass this issue by attaching to the running Outlook project.


Andrei Smolin
Add-in Express Team Leader
Posted 05 Nov, 2019 07:59:28 Top
May Wolfgang


Guest


Yes, you have right! It works if I run registered addin and not running the VS. Thank you!
Posted 05 Nov, 2019 08:58:34 Top
Andrei Smolin


Add-in Express team


Posts: 18825
Joined: 2006-05-11
Welcome!


Andrei Smolin
Add-in Express Team Leader
Posted 05 Nov, 2019 08:59:28 Top