473,401 Members | 2,139 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,401 software developers and data experts.

Drag-drop out of windows app

Hi All,

I'm working on Windows application that allows users to drop files from Windows Explorer, and saves them off somewhere.

What I'd like to do is have the same application allow users to drag image names from the list box into Explorer(or the desktop). The application in turn would internally resolve the image path and copy the file to the Explorer.

Has anyone ever done that? If so, can you please direct me to some useful articles.

Thanks,
Vlad
Feb 21 '07 #1
2 1123
RedSon
5,000 Expert 4TB
This is a pretty short article that should give you a few ideas.

http://msdn.microsoft.com/library/de...mpDragDrop.asp

Let me know if this helps.
Feb 21 '07 #2
Hi,

Thanks. I got as far as:

Expand|Select|Wrap|Line Numbers
  1.   private void listViewContents_ItemDrag(object sender, ItemDragEventArgs e)
  2.         {
  3.             ListView listView = (ListView)sender;
  4.  
  5.             ListViewItem[] items = new ListViewItem[listView.SelectedItems.Count];
  6.  
  7.             int i = 0;
  8.             foreach (ListViewItem listViewItem in listView.SelectedItems)
  9.             {
  10.                 items[i] = listViewItem;
  11.                 i++;
  12.             }
  13.  
  14.             // Create a DataObject containg the array of ListViewItems.
  15.             DoDragDrop(new DataObject("WhatGoesHere", items), DragDropEffects.All);
  16.         }
Now, what do I put into DataObject()?

Thanks,
Vlad
Feb 21 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Samuel R. Neff | last post by:
I have a typical TreeView/ListView combo and can drag from the ListView to the TreeView. I'd like to select the TreeView node that is the target of the drag operation as the ListView items are...
2
by: Samuel R. Neff | last post by:
I have a typical TreeView/ListView combo and can drag from the ListView to the TreeView. I'd like to select the TreeView node that is the target of the drag operation as the ListView items are...
0
by: david | last post by:
Yesterday I got a suggestion about the web page layout from Stas. Thanks, Stas. However, I have a problem to drag the existing radio buttons into the table cell. Case: I have a lot of radion...
2
by: vunet.us | last post by:
Hello JavaScript experts, I have a floating div which I drag all over the page. If the page has scrollbars and users drag the floating div to the very top, page scrolls up too. The problem occurs...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.