Drag and Drop problems

  • Thread starter Thread starter Colin Young
  • Start date Start date
C

Colin Young

I've got a owner-drawn listview control that displays images and now I'm
trying to implement drag and drop so I can drag images from the control and
drop them onto other applications. So far if I drop on windows explorer it
works (i.e. an image file is created where I dropped the image) or the
console displays the full path to the image. Unfortunately it doesn't work
with Excel. Nothing at all happens. No error, nothing.

The code I am using is partially adapted from the FotoVision application,
but done in C#. The FotoVision code works as desired, but isn't directly
usable, hence the reason for reimplementing it.

Are there special requirements to drop images onto Excel? Is there something
obvious I might be missing?

Thanks

Colin
 
Hi Colin,

Regarding on the issue, I am
finding proper resource to assist you and we will update as soon as posible.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security(This posting is provided "AS IS",
with no warranties, and confers no rights.)
 
Hi Colin,

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that you need to drag and drop an object
from your application to Excel and Windows Explorer. If there is any
misunderstanding, please feel free to let me know.

Based on my research, we cannot drag and drop an image file from windows
explorer to Excel directly. Dragging it to Excel means to open the image
file using Excel. However Excel cannot open image file. so the operation
failed.

I would like to know how you passed that image object to windows explorer.
We can try to pass the image to Excel as an object, not URL. Could you show
us your code? If FotoVision code works, how did it achieve that? Please
provide us with more information, so that we can resovled the problem mroe
quickly. Thanks!

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
Now it isn't working from FotoVision. Odd because I specifically tested it
with Excel (or I was hallucinating from a lack of sleep or food, or from the
ridiculous humidity around here, any of which are possible).

It looks like it isn't going to be possible for me to provide a nice drag
and drop interface for my users to insert images into a spreadsheet. I'll
have to look into using VSTO to come up with some sort of solution.

Thanks

Colin
 
Hi Colin,

It seems that we need Excel to accept the type of drop, so that we can
decide what type of data we should pass. However, I don't think we can
change the behavior of Excel.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
It would be nice if we could change the behaviour of Excel. I'd still like
to know exactly what I was doing when I became convinced you could drop
image on Excel (it can't be done from anywhere, even Explorer). My memory of
doing it is so vivid...

Colin
 
I made a porting of FotoVision from VisualBasic.Net to C#. I ported
only the web application. I used the C# ASP.NET application to realize
a web site with my digital photos that are designed to be used as
full-screen computer desktop backgrounds. The images are available for
free download in 1600x1200 resolution.
I made available the FotoVision C# source code in this website at :
http://www.mybackgrounds.tk

If you know a web ring of other sites that feature similar content
please let me known.

Moreno Borsalino

Visit my desktop photos collection at http://www.mybackgrounds.tk
(made with FotoVision)
 
Back
Top