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


ADVERTISEMENT

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 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 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

Drag And Drop Items Into The Panel

Jan 26, 2009

I'm having trouble with my panels. I taught myself VB (and the other languages I know) so I don't know all the terminology, so bear with me. But I'm making an application, and in this application I have a set of radio buttons, and because I only wanted one to be checked at a time, I put them in a panel. The problem is, I want to add more stuff to the application (form?) and anytime I add something that is in the area of a Panel, it becomes part of that Panel.

This is all fine and good when you are trying to drag and drop something right into the panel, it makes it really easy. But when I'm trying to drag and drop something else in that area where the panel just happens to be, I don't want it to be in that panel. So how can I make it so the panel stops parenting my other items on the page? I hope that makes since.

View 5 Replies

Drag N Drop Items Within Is Columns?

Jun 6, 2011

I was just wondering, if I have a list view control, with 2 columns, and insert items to those columns, ex:

[Code]...

That is my question I hope you can give me an answer if this can be achieved trough the listview control from vb.net or other control that you know of. If you post an example in C#, maybe I can create al DLL and put it as a control in my vb.net tools, but I just want to know if this can be done.

View 3 Replies

Get Drag And Drop Items Working

Jan 12, 2010

im sat working on a quiz system for a music teacher, need to get drag and drop items working.{removed by Moderator we are not a dating site.}

View 1 Replies

Drag And Drop Within A ListBox?

Nov 18, 2009

I'm trying to write an VB 2008 application where I want to rerrange the items in a listbox using drag and drop (to allow the user to reorder the items). Has anyone every done this and would be willing to point me in the right direction?

View 1 Replies

ListBox Drag And Drop?

Jul 1, 2010

What I want to do is make it so I can take a .dll file and use DragAndDrop to drop it into the listbox but it will not at all work. For now I am trying to just get it to work so I am using any file to drag and drop.I have turned on "Allow Drop" for the listbox and entered this code:

Private Sub ListBox1_DragDrop(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles ListBox1.DragDrop
If e.Data.GetDataPresent(DataFormats.FileDrop) Then

[code].....

View 13 Replies

VS 2008 Drag Drop Listbox To Listbox?

Mar 17, 2011

Trying to drag/drop an item from one listbox to another on a windows form.Listbox1 is bound to a table and the data is populating correctly.Listbox2 is empty and has allowdrop set to TRUE. The goal is to drag items from LB1 to LB2.Problem is when I click on the item in LB1 it will not allow me to drag the item to the other box. As soon as I click on the item in LB1 the mouse pointer turns to a circle with a line through it.

<CODE>
'''LB1
Private Sub lstISA_MouseDown(ByVal sender As Object, ByVal e As

[code].....

View 6 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

Drag And Drop Value In Textbox From Listbox

Sep 25, 2009

I am developing an application in which I have a list of values in a list box and a text box. i want application user can drag the value from list box and drop in textbox at his required position. Can anybody assist me how can i do this in vb.net

View 3 Replies

Folders In ListBox - Drag And Drop?

Dec 20, 2009

Is it possible to have folders in a toolstripdropdownbutton? How do I get a drag and drop for my listbox? It is called listbox2.

View 5 Replies

VS 2008 Drag And Drop To Listbox?

Nov 13, 2009

So i want to drag and drop a file into the list box. All i want to do when i drag the file i want the path to show only.

For example if the user drags a text.txt file into the list box all i want in the list box is the path like C: ext.txt

View 9 Replies

Drag And Drop Outlook Attachment To Listbox?

Feb 10, 2011

I'm having trouble figuring out how to do this. I'm using VS2010, and am writing an app that must allow a user to drag an attachment from an Outlook e-mail onto a listbox and have the listbox populated with the contents of the file. It would just be a text file containing filenames, one per line.

View 10 Replies

Drag And Drop Won't Work With Bound Listbox?

Jun 26, 2009

For some reason when I try binding the listbox to a datasource I put in (it contains a table of words to be used in the listbox), it shows me a + sign like it will allow my to drop text in but then it doesn't insert anything. Does this code not work for databound related things?

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 16 Replies

VS 2005 - Drag And Drop From One List Box To Another Listbox

May 2, 2012

I want to select some user from list of user(listbox1) to another listbox(listbox2). The listbox1 contains the userids which is from a access table. If i move from listbox1 to listbox2 with the default values it is working fine, but when i try to do the same which is loaded from access table i am getting error. "Items collection cannot be modified when the DataSource property is set." [Code]

View 2 Replies

Outlook 2007 Email Items Drag And Drop Event?

Aug 21, 2009

I have an Oulook AddIn project to which I would like to add a functionality to be able to drag an email item into a folder in Outlook's Main Folder Pane. I would like to have the folder in which an item is dropped into to recognige the new item and pop up a message.

I would like to know what events to use to achiev this task.

View 6 Replies

Drag And Drop Windows File Icons Into ListBox

Jul 18, 2010

I found this code but can't use it as its VB6 and I need VB 2008. I tried changing it but can't seem to get anywhere.
Code:
Private Sub List1_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim vFile As Variant
If Data.GetFormat(vbCFFiles) Then
For Each vFile In Data.Files
List1.AddItem vFile
Next vFile
End If
End Sub

View 2 Replies

VS 2008 Drag Drop Multiple - ListBox To TreeView?

Feb 13, 2010

I've been successfully dragging one item at a time over from a listbox to a treeview, but now that I'm trying to adapt it to drag/drop multiple items, I've run into a problem.I'm getting an index out of range exception in the loop where I'm trying to gather the listbox items into a string array. Any index greater than 0 throws the exception, even though I have set the length to equal the number of selected items in the listbox. I've double-checked that this is the case many times. Watching the selecteditems.count value, I can see that it is equal to the number of items I have selected, naturally, but the exception is still thrown on this line:

sel(i) = AddonsList.SelectedItems.Item(i)
Here is the relevant drag/drop

[Code]...

View 1 Replies

Wpf - Drag And Drop For Listbox From Scratch MVVM Using ICommand?

May 4, 2012

Without using MVVMLight, I need to implement drag and drop for photos onto a listbox using mvvm using Icommands preferably and interaction triggers, however if i use commands then I don't know what to pass in for a command parameter? Any ideas? Thanks.

Heres some ideas I tried:

Public Property ImageList As New ObservableCollection(Of ListBoxItem)
Public Property AddImageCommand As ICommand = New Adjuster.DelegateCommand(AddressOf addImage)
Public Property DropCommand As ICommand = New Adjuster.DelegateCommand(AddressOf dropImage)

[code]....

View 1 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

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

Forms :: Drag Multiple Items From One Listbox To Another?

Mar 10, 2011

I've looked everywhere on the internet for multiple items drag&drop between listboxes and found only examples showing single item drag. I know how to make a single item dragdrop operation between two listboxes using MouseDown, DoDragDrop, DragEnter, DragDrop Now what I'm looking forward to learn is the ability of dragging more than one item from one listbox and dropping them in another listbox

View 2 Replies

VS 2008 Drag In A Listbox Looses Previous Items In The Box?

Sep 23, 2010

I have a form with a ListBox and AlloDrop property to TRUE.If I DRAG a file (FILE1) into the ListBox the Item is added nicely.However when I drag a next file (FILE2),even when I am dragging the FILE2 and LISTBOX takes focus, looses the previous item already in the box...(ie FILE1)....

View 4 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

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

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

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







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