Drag And Drop From ListView Control, To Shell (Desktop)

May 20, 2009

This is a little diffrent from your standard drag and drop, but I am trying to find out a way to support drag and drop, from a list control, which is displaying a list of files, held as "blobs" in a SQL database (compressed data in my own format). When the form is opened, I obtain a list of all the file names within that given table in the database, and display it to the user in the list view control. The user then has the option of dragging that ListItem from the ListView on to the dektop (or other directory location). Upon doing so, I need to be able to read the data from SQL, decompress the data (in my own format) and then save it as a file at the dropped location.

My main problem is detecting when the ListItem is dropped outside of my application, as I want to use this dropping event to trigger the code in to obtaining a copy of that file from the database, and save it in to the "dropped" directory, where ever that may be.

So Im mainly looking in to how I can "see" the final location where the item is dropped, and how I can start off the drag and drop operation in the first place with no initial data (since I have not obtained the file at the start of the operation). Getting the file at the start of the drag and drop operation intoduces "lag" while the application makes the trip to the SQL database (via web service) and obtains the data, so I need to carry out that trip to the database, at the end, while still allowing "Windows" to act as if I am dragging and dropping a file...

I did consider multi-theading, and downloaind the file from the database while the drag and drop operation is in progress, but then it becomes a race between the data being obtained from the database, and the user dropping the file.

Im using VS2005, SQL 2005 where the file is stored as a blog. SQL is on another PC running a web service which I interact with, to allow my application to talk to the database over both a LAN and WiFi via the internet. Compression and de-compression is handed at the client side application (for the file itself, in order to reduce the footprint created by the internet traffic) , where the user interface is displayed.

View 6 Replies


ADVERTISEMENT

VS 2008 Listview Drag And Drop (preserving The Listview .tag After Drag And Drop)

May 25, 2011

I am trying to figure out a way to include the listview's tag field when dragging one listview's subitems into another listview. I am hoping someone here has experience with this. My Listview drag code is below - the two listviews that I am dragging subitems into or from are LV1 and LV3. Also, this is being done in Visual Basic 2008 and the project is a windows application.

[Code]...

View 4 Replies

ListView Drag&Drop Allow To Drag&Drop Between Form?

Aug 27, 2009

ListView Drag&Drop allow to Drag&Drop between form??

Public Class frmModule
Private Sub ListView1_ItemDrag(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ItemDragEventArgs) Handles ListView1.ItemDrag[code]....

Can it be drap and drop item to other form control??How to write the event when mouse up at the other form control?

View 2 Replies

Drag And Drop From Datagrid To Desktop?

May 31, 2012

Is it possible to (without a mile of code) Drag and drop files from a datagrid to the desktop or open folder?

I have tried this:

Dim sFile As String = "D: est.pdf"
C1Grid_Documents.DoDragDrop(New DataObject(DataFormats.FileDrop, sFile), DragDropEffects.Copy)

But no file is created.

View 8 Replies

Drag An Drop A Desktop Shortcut To The Form?

Feb 19, 2010

Is it possible to drag an drop a desktop shortcut to the form and then launch the program from there ? Is so how would this be done ?

View 39 Replies

Drag And Drop Items From Listbox To Desktop

Jul 15, 2011

I have a ListBox control, that contains a few items that display attachments (files or directories). I have successfully allowed users to drag and drop items from their desktop to the ListBox , but I have not been able to allow the user to drag and drop items from the ListBox to their desktop. Is this possible?

View 1 Replies

Drag And Drop On A Desktop Shortcut Icon?

Jun 1, 2011

I found this thread[url]...

and I have encountered the exact same problem, that the desktop shortcut icon created by the Setup program does not work when dragging and dropping a file (in this case an Access-database) onto it,

while a shortcut manually created works just fine.

I do not understand the answer in the above thread. But, anyway I would like to find a way to solve the problem directly, preferably through the Setup program itself.

View 2 Replies

Drag An Item On Desktop To Listview?

Apr 23, 2010

how to drag an item on my Desktop to my Listview?

View 1 Replies

IDE :: Drag And Drop In The Same Listview?

Jul 22, 2009

I am trying to implement a drag and drop operation in a listview (the listview is set for Details). The idea is to be able to allow the user to select one or more items and then "move" them elsewhere in the list.and modified it some because that example does the operation between two listviews, and here I am trying to do everything in the same one.Here's the code as I have it:

Private Sub ListView1_ItemDrag(ByVal sender As Object, ByVal e As System.Windows.Forms.ItemDragEventArgs) Handles ListView1.ItemDrag
Dim myItem As ListViewItem

[code].....

View 6 Replies

Drag And Drop From OpenFileDialog To ListView?

Sep 15, 2009

I want to drag and drop avi files to a listview for burning from a OpenFileDialog box. I have used most of the code on here and nothing works. I am using VS 2008 Pro, OS is Vista. If there is any code out there, could someone Please point me in the right direction.

THNX in advanced.VB 6.0, VBExprss, ASP,Net, & Gaming

View 7 Replies

VS 2005 - ListView Drag And Drop

May 20, 2011

In the attached program, I have 3 listviews.
1 is Source Invoices
2 and 3 is Customers.

When I drag something from ListView1 - it stays there, and turns a different color to show it has already been assigned. It stays in the list. This is what I want. When I drag something between 2 and 3, it should delete from the source and clone to the destination. It does this when I move 1 at a time, but if I select multiples (try 5 records) it does 3 of them, then the source list gets an error:
System.NullReferenceException: Object reference not set to an instance of an object.

If I highlight all 5 items in list 2 or 3 - then select the top item as the item to drag across, it seems to work.
If I highlight all 5 items in list 2 or 3 - then select the middle item as the item to drag across, it seems to NOT work.

I have tried going from top of list to bottom. Then thought, since I am deleting rows, maybe I should start at bottom and work up. Same thing?

View 22 Replies

Listview Drag & Drop - Items Go To End Instead Of Where Dragged

Jul 1, 2010

I am trying to set up a listview where I can reorder the items, but no matter what I do the item i drag and drop goes to the end of the listview. I searched and tried to fix this issue but I just can't seem to find a fix.

[Code]....

View 5 Replies

Change Order Of Listview Columns Via Drag & Drop?

Mar 11, 2010

How would i change the order the colums with drag and drop[code]...

View 1 Replies

Form Control - Using Listbox Or Drag And Drop Control?

Jul 6, 2011

I have a form set up with a few text boxes for first name last name and job title and i got the class for EditDialog. vb. The question is I have to drop some controls onto the form to make a generic add and edit employee dialog. Now would I use the listbox or drag and drop control?

View 2 Replies

Drag And Drop Control In RunTime?

Feb 28, 2010

How can drag and drop control in RunTime ?

View 10 Replies

How To Total Folders And Including Files From Windows Explorer Into Listview Using Drag And Drop Method At .net

Aug 10, 2009

how to Total Folders and including files from Windows explorer into listview using drag & drop method at vb.net

View 3 Replies

Drag & Drop A Dynamically Created Control?

Feb 3, 2010

Using a module in my project, I added Drag & Drop functionality to the picture boxes on my form.

View 3 Replies

Drag And Drop - Control To List Sub Categories

Oct 23, 2009

I want to have a control listing all subcategories from a database table. What control should I use. then I want to have a treeview with Categories, and be able to drag and drop sub categories onto the Categories. VS 2008

View 5 Replies

VS 2008 - Drag And Drop GridView Control

Jul 6, 2009

I am working on visual studio 2008 , when i drag and drop a GridView control, I cant see any way of showing the page index by run time. How do I associate one DataSet object (which has got 10 rows) first 5 rows I need to show in first page rest i need to show in next page, basically I need to divide my dataset information in to two seperate page indexes.

View 3 Replies

Drag And Drop - Row Provided Already Belongs To DataGridView Control

May 25, 2009

For Each DGR As DataGridViewRow In dgvJobs.SelectedRows
' Added to stop error occuring when destination dgv columns do not exist
If dgvProject.ColumnCount = 0 Then
For Each ColumnHeader As DataGridViewColumn In dgvJobs.Columns
Dim name As String = ColumnHeader.Name
[Code] .....

I'm making a form where I have two datagridviews. The first dgv is databound to a database. The second dgv is not databound. I want to allow users to drag rows from dgv1 and drop them on dgv2. At the moment I have managed to get it to the point where I can drag from dgv1 to dgv2 but the result is an empty row being added. When I try adding a row without using .Clone I get this error "Row provided already belongs to a DataGridView control."

View 2 Replies

2008 : Apply Drag And Drop Control Like Visual Studio?

Aug 24, 2009

How to apply drag and drop control like visual studio...after start dragging, the control still there, and make a rectangular image and drop to local form or other form...

View 3 Replies

Drag And Drop - Drag Picturebox1 And Drop It In Picturebox2

Nov 18, 2009

I am currently working on a drag and drop project and I was wondering if there is a way to drag picturebox1 and drop it in picturebox2; that will snap to a specific location in the picturebox2?

View 2 Replies

C# - Drag-and-drop A Word Document 2003/2007 Control In Form By .NET Framework?

Jun 10, 2011

I want to drag-and-drop a Word Document 2003/2007 control in my form by .NET Framework. Like we do for PDF in the following screenshot. If you see the highlighted text, it is Adobe PDF Reader. I can show the PDF documents in this control in my form.

View 1 Replies

C# - Drag And Drop From Excel Cells To A Drag-enabled Task Pane Programatically?

Oct 31, 2010

I am using Excel 2007, VS2008 Pro.I am building a VSTO Add-in that requires "drag and drop from Excel cells to a drag-enabled task pane".So far I notice that I can only drag and drop within the cells themselves. It does not allow me to drop into the task Pane or drag past the sheet limits.(http:)[url]...

Note: The task pane has drag drop enabled, I ahve already tested I can drag/drop from task pane to excel but I need to do this the other way around?

View 1 Replies

Label Size - Drag The Label Object From The Toolbox And Drop In The Tab Control Container

Feb 4, 2007

I have been using vb6 for a while, I am following a tutorial by MS to develop a basic application and a simple task cannot be completed for whatever reasons! The tutorial asks to drag the label object from the toolbox and drop in the tab control container. Then, go to the label size property and adjust the size to some different dimansion. Basic stuff, right? It won't let me do it! After I enter the new dimensions (which by the way are not large or very small), the label size (both width and height) resets back to its original dimensions! I have the vb.net sp1 installed.

View 2 Replies

VS 2008 Component Class - Drag And Drop Control Onto New Class

Nov 21, 2009

I am searching for the Component Class. When I go to "Add New Item" ,in my project their is no Component Class Item in VS 2008. I would like to Drag and Drop control onto my new class and I can't see how to do this ?

View 6 Replies

Drag/Drop Within A Tree And Drag/drop From Tree To Textbox

Oct 20, 2010

drag and drop nodes within the same tree (not between trees) when users drag and drop nodes within the tree, give them the option to move the original node to a new location within the tree OR to just copy the original node in a new location (seems complex but I have a month to figure this out). change the system default blue highlight for selected nodes to another color change the system default cursors for invalid and valid drops (instead of the circle with slash indicating invalid target, i want a red minus) and (instead of the little plus sign with little box indicating a valid target, i want just a big green plus sign) add a red insert line to indicate where the node would be dropped within a tree also drag and drop the text of a node from the tree to a textbox add a "folder" image next to parent nodes and a "document" image next to children nodes

I have looked through the internet but I am having difficulty sorting through all the information available (I see a lot of information for Visual Basic 5 and 6, and those codes don't work for me in visual studio 2008). I can email anyone my code I have so far.

Public Class Form1
Private MouseIsDown As Boolean = False
Public Sub TreeView_ItemDrag(ByVal sender As Object, ByVal e As ItemDragEventArgs)Handles TreeView1.ItemDrag

[Code]....

View 4 Replies

Drag/Drop In A Drop Down List?

Apr 5, 2011

Is it possible to reorder the elements of a drop down list (combobox) via drag and drop?For example, when the list is dropped down, I want the user to be able to drag the items up or down to reorder them. I tried this (and some google searching) but I'm wondering if its just not possible:

Private Sub cmbClassLists_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles cmbClassLists.MouseDown
If cmbClassLists.DroppedDown And Not cmbClassLists.SelectedIndex = -1 Then

[code].....

View 2 Replies

Can't Drag And Drop Right

Jun 23, 2009

I want to be able to hold CTRL down to select multiple text entries and drag them all to certain text boxes. Or even one at a time, but once I try dragging another word into the box it replace the first one. Is there any way to just have it add to the text box rather than replace it?

And if possible, place a "-" between each entry?

This is the pop-up form with the listbox that contains the words to drag:

Private Sub ListBox1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles ListBox1.MouseDown
ListBox1.DoDragDrop(ListBox1.SelectedItem, DragDropEffects.Copy)

[Code]....

View 13 Replies

Drag And Drop In Wpf?

Jan 20, 2011

I am wondering how to do simple drag and drop in wpf? All examples I found over the new were in C#

View 8 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved