VS 2008 Drag Files Into Listview?
Jul 6, 2009How do you make a listview that will allow you to drag files onto it and they will be displayed like they would in windows explorer?
View 3 RepliesHow do you make a listview that will allow you to drag files onto it and they will be displayed like they would in windows explorer?
View 3 RepliesI 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]...
how to Total Folders and including files from Windows explorer into listview using drag & drop method at vb.net
View 3 RepliesI want to drag files & Folders into my published VB EXE to list it How ?( info: i want it when my program is not running in the processes )Like when you drag text files into closed notepad.exe notepad.exe will open the dropped textI want like that exactly.And also in the shell windows explorer context menu. (open with...)
View 3 RepliesI have a doubt. I'd like to make a program where you can drag music files (mp3, flac, wav, wma..) and video files (avi, mpeg, mp4, vob, mov) and get the property values of this ones... For example, bitrate, KBps, size, etc, to put them in textbox or listboxes.
View 3 RepliesI have a media browser program I am building. I am trying to use drag/drop so a user can drag media tracks from one listview to another listview and then use the second list view as a playlist in windows media player com object. Reading at MSDN I have found out that there is no built in support for item re-ordering with the listview control. I have listview1 working correctly but when I try to reorder items in listview2, the dragged item ends up at the end of the list. So basically I need to get the item insertion index corrected. I have tried more than 10 times to get this code right.
Here is my code which includes a form with two listview's.
Public Class Form1
Private Sub ListView_ItemDrag(ByVal sender As Object, ByVal e As _
System.Windows.Forms.ItemDragEventArgs) Handles ListView1.ItemDrag, _
ListView2.ItemDrag
[CODE]...
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?
I'm currently grabbing all files in a folder and displaying them into a listview. Below is the code I'm using:
[Code]...
If you look at the "For" line, you can see that pulling all files with an extension of .txt. There are some files that I need to pul with different extensions. I tried just doing "*.", and it would grab the files with not extension, but not the txt extension.
So, I wanted to know if there was some way to just pull all files or specify more than one extension.
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].....
I'm making a program that search for files with the specified extension. It also shows hidden files. How can I make the hidden files get a different color in the Listview? And how do I do that with only the hidden files?
View 5 Replieshow to drag an item on my Desktop to my Listview?
View 1 RepliesI 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
I am converting my company's VB6 program over to VB.net and I have hit another stupid little roadblock.
The old program had a ListView docked to the left side of the application screen. The user could place the cursor over the right portion of the ListView, the cursor would turn into the SizeWE arrows, then they could drag it, which would resize the ListView.
I am trying to recreate this. As far as I can tell there is no Property called "Resizable," or at least nothing is popping out to me. I do not believe that it is being done in the code.
Is there a property I am missing? If not, is there an easy way to do this within the code? (ie. is there a event that would make my life easier)
I am using Visual Studio 2008.
Edit: I see how how it was done in the previous program (you always seem to find it once you ask the question, don't you?). The old program had a invisible picture that was only a few pixels wide that when hovered over would change the cursor to SizeWE. You could then drag that invisible picture and that would hit an event that would then change the size of the ListView. This seems rather convoluted. My question still stands: Is there a better way to handle this dragging and resizing?
I have an MDI client, and I have a listview inside it. I want it to be kinda like a desktop feature. The problem is that whenever you open a MDI child and you drag it to the listview, it goes under it.
View 6 RepliesIn 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?
Want to display all files ending in extension .bat in the %Homepath% dir and upon double click populate a textbox.text with readalltext.
VB.NET
Public Class batviewer
Public Sub showfiles()
[Code].....
1. I wonder if you would tell me how to use mousedrag a row in Datagridview drop to Listview with Visual Studio VB.NET 2008?2. How to put Datagridview or Listviewows backgroundin difference color? e.g first row is red color, secord row is whitthrid row is red and so on...
View 2 RepliesI 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]....
How would i change the order the colums with drag and drop[code]...
View 1 RepliesThis 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.
In WinXP with LV FullRowSelect enabled I can press and hold down the left mouse button and drag it down the right side of the left-most LV column and the rows are selected, but under Win7 I can only multiselect items with the mouse if FullRowSelect is set to false.
So I guess I need to write code to support this sort of feature for Win7 ? , and if true are there any code examples (I can't find anything) to save me some time?
I want to drag-drop single text items from ListView-A to ListView-B (both are in Details mode), but can't see how to read (and hence highlight) the index of the line in ListView-B when the mouse is hovering over it. Easy in a ListBox, but the PointToClient > IndexFromPoint features don't work with ListView controls and I just can't see another way .
View 6 Replies1. Although I have enabled AllowDrop property of ComboBox it does not allow me to drag and drop files into ComboBox. Why?
2. Then should I process incoming files in the _DragDrop event, yes?
3. How can I get the Files.Count to get the number of dropped files?
I am working on some software to work along side our client database and I am basaically trying to add in a basic form of File Management. I have a listbox now that displays the current contents of the clients electronic file. I am wanting to set it up so that people can drag files from anywhere onto this Listbox and move that file to the clients electronic file.
For refrence the clients folder is always situated in same place which is client filesclientID where clientID is the clients unique Id on the database.
how to Drag and Drop to cut files/folders and it opens a folderdialog for the destination:(
View 5 Repliesive come back to working on this and have got 3 large drag/drop ares of my project done, but im having a little trouble on the last part, which is freeing the files back up.If i drag/drop for instance a zip into my app and it extracts then finishes, in explorer im unable to delete the zip whilst my app is still running, the file in use error come sup. So how do i go about releasing the resources after the drag/drop events done
View 7 RepliesIm creating a program where you drag .WMV files into a listbox. I have the drag drop working but it displays the location of the item. How do I get it to only display the filename of the item ive dragged into the listbox?
View 4 RepliesI use a .NET richtextbox and I want to have the EnableAutoDragDrop property set to True. This allows user to drag&drop text, rtf and images around etc. However, I need to process files dropped into the richtextbox myself - I do not want them to be embedded as OLE objects when they are dropped.
How can I overcome this? Is there any way to delete embedded files from richtextbox?
(I've found API DragAcceptFiles which doesn't work for some reason.)
I am trying to do drag and drop from files on my computer.Say the user has a file on the desktop, and he/she drags it onto the open application, I would like it to read the file path of the file and put that in the first column of my DataGridViewI have tried this but get no luck, I have DataGridView AllowDrop equal to True, but when I drag a file to it I get the "Circle with a line through it" action meaning it can't be done.How do I drag and drop?
View 3 Replies1) I'm dragging a file (.txt) into a rtb which works fine, but how do I get the filename? (messagebox whatever)
2) How do I restrict files to drop? (like a .exe)
vb.net
If e.Data.GetDataPresent(DataFormats.FileDrop) Then
Dim Files() As String
Files = e.Data.GetData(DataFormats.FileDrop)
Dim sReader As New StreamReader(Files(0))