Support Center

Dragging Outlook Attachments into the Image Viewer Control

Last Updated: May 09, 2013 09:45AM EDT
The attached samples (C# and VB.Net) show how to display images dragged from Outlook 2010/2007 into the ImageMan.Net Viewer control. The code is based on a CodeProject article at http://www.codeproject.com/Articles/28209/Outlook-Drag-and-Drop-in-C.

The code takes the dropped attachments from Outlook and treats them as images and tries to load them into the viewer control. If they are not images or are not a supported format the .Load method will throw an exception. The attachments are loaded directly from the MemoryStream they arrive in and are not saved to disk.

The solutions are based on Visual Studio 2010 and ImageMan.Net V 3.x but could be converted to Version 2.x by updating the references and removing the reference to the DTI.ImageMan.Codecs.Pdf.dll assembly (new in Version 3.x).

Contact Us