drag & drop problem
-
let say i have a panel, and in that panel i loaded an image:
panel.BackgroundImage = Image.FromFile("image.gif");
Now, i what to make drag & drop with this panel and i want to obtain the name of the image. How can i solve this? When i make the drag & drop operation, can i obtain both the image, and the name of the image? how? -
let say i have a panel, and in that panel i loaded an image:
panel.BackgroundImage = Image.FromFile("image.gif");
Now, i what to make drag & drop with this panel and i want to obtain the name of the image. How can i solve this? When i make the drag & drop operation, can i obtain both the image, and the name of the image? how?Hi, the way I understand it is you can create any object you like, and pass it to Control.DoDragDrop() when you start dragging, and retrieve it from DragEventArgs.Data when you handle the drop event, so it is possible to store both a file name and a bitmap, or anything else you choose. :)
Luc Pattyn [My Articles]
-
Hi, the way I understand it is you can create any object you like, and pass it to Control.DoDragDrop() when you start dragging, and retrieve it from DragEventArgs.Data when you handle the drop event, so it is possible to store both a file name and a bitmap, or anything else you choose. :)
Luc Pattyn [My Articles]
i succed to drag & drop the backgroundImage of the panel to another panel, but i want to obtain the name of the image too. I don't know what is the function which get the name of the image.
panel.BackgroundImage = Image.FromFile("pic.gif");
don't exist a function which take an image parameter and return the name and it's path? -
i succed to drag & drop the backgroundImage of the panel to another panel, but i want to obtain the name of the image too. I don't know what is the function which get the name of the image.
panel.BackgroundImage = Image.FromFile("pic.gif");
don't exist a function which take an image parameter and return the name and it's path?No, there is no such function. An image can exist without a file; and different files can contain the same image, so what should such a function do in these cases ???
Luc Pattyn [My Articles]