Support Forums

Full Version: "help plz "Multidownload files
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
hi i want code for Multidownload files from listbox or listview
when the 1 file are downloaded the 2 file will be downloaded too
thanks in advence and sorry for my bad english
downloaded in sequence or all at the same time?
I recommend downloading the file through using WebClient. Loop through each item in the listbox, and then run the WebClient download.
I would recommend a listview, people only use listboxes because it's easier, but listview controls can handle more data, and you don't need to click on it to see the full list of added items depending on the size properties... Some people would even go to use a combobox. If you're dealing with even larger data, then you would use a datagridview control.
(08-29-2011, 01:43 PM)Ace Wrote: [ -> ]people only use listboxes because it's easier,

Exactly. Why give yourself more work when all you might need is a simple ListBox.
Obviously it depends on what the application is actually for though.
(08-29-2011, 02:03 PM)Fragma Wrote: [ -> ]Exactly. Why give yourself more work when all you might need is a simple ListBox.
Obviously it depends on what the application is actually for though.

That's true, but you could spice it up in a listview a lot better as well. You can have multiple columns for say a progressbar or the download status. Like in Utorrent.
Hi and thx for reply ACE yes i wannt to do this in same time
Fragma i don't understand how i can use webclient can you give me idea of code how i can use
thanks again
There's lots of documentation on MSDN, go take a look. I don't provide code all the time for leechers, you have to learn partly for yourself. If you know how to multi-thread on top of that, then you combine the two and you have a multi-file downloader
Google some of the stuff me & Ace have mentioned and you'll find what you're looking for. I could give you the source but you wouldn't learn anything from it. Better you have a little look around yourself, and understand exactly what it is that you're going to be doing.

If you're going to use a ListBox, you'll need to use "For, Each.. Next" in order to loop through your items.
For example...

For each string in your ListBox...
Download the file...
Next, will run the download function for every file in your ListBox.

Once you know how to run a basic loop through your listbox, move onto finding out how to download each file using WebClient.

http://msdn.microsoft.com/en-us/library/5ebk1751.aspx
http://msdn.microsoft.com/en-us/library/...lient.aspx
(08-31-2011, 12:50 PM)Fragma Wrote: [ -> ]Google some of the stuff me & Ace have mentioned and you'll find what you're looking for. I could give you the source but you wouldn't learn anything from it. Better you have a little look around yourself, and understand exactly what it is that you're going to be doing.

If you're going to use a ListBox, you'll need to use "For, Each.. Next" in order to loop through your items.
For example...

For each string in your ListBox...
Download the file...
Next, will run the download function for every file in your ListBox.

Once you know how to run a basic loop through your listbox, move onto finding out how to download each file using WebClient.

http://msdn.microsoft.com/en-us/library/5ebk1751.aspx
http://msdn.microsoft.com/en-us/library/...lient.aspx

You could use more than that for the loop, although for each is probably what I would go for.

You could do while i <> "listbox items count>" -1 ' to reference index 0 as an item. And dim i as an integer of 0 to start adding one each time.
Pages: 1 2