Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
"help plz "Multidownload files
#1
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
Reply
#2
downloaded in sequence or all at the same time?
Reply
#3
I recommend downloading the file through using WebClient. Loop through each item in the listbox, and then run the WebClient download.
Reply
#4
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.
Reply
#5
(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.
Reply
#6
(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.
Reply
#7
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
Reply
#8
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
Reply
#9
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
Reply
#10
(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.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Need Help with Registering VB Files G1™ 2 818 12-12-2010, 06:24 PM
Last Post: Flamingo
  vb.net associated files? thanasis2028 2 1,049 12-11-2009, 12:49 AM
Last Post: thanasis2028

Forum Jump:


Users browsing this thread: 1 Guest(s)