My Visual Basic 2010 file downloader won't work properly with my web browser.

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Hi! Ive made a web browser in Visual Studio/Basic 2010... Im using a extended web browser wich includes the property Navigating Extended.
Ive added a file downloader to my web browser. The downloader has 3 buttons: Save, Open directory, Save as.
In my Settings i have made a setting called NameOfFile wich includes 115 different names for downloads... So when you press the Save button it will save it without asking you for name and path... It just saves it in the Applications directory. But when
i press save; It saves 115 files with the names thats in the NameOfFile... Can you help me find a better code or help me with the current code?
Thanks
/Visual Vincent
Code:
<span style="color:#0000ff; font-size:small <span style="color:#0000ff; font-size:small <span style="color:#0000ff; font-size:small Private<span style="font-size:small <span style="font-size:small <span style="color:#0000ff; font-size:small <span style="color:#0000ff; font-size:small <span style="color:#0000ff; font-size:small Sub<span style="font-size:small <span style="font-size:small Button1_Click(<span style="color:#0000ff; font-size:small <span style="color:#0000ff; font-size:small <span style="color:#0000ff; font-size:small ByVal<span style="font-size:small <span style="font-size:small sender
<span style="color:#0000ff; font-size:small <span style="color:#0000ff; font-size:small <span style="color:#0000ff; font-size:small As<span style="font-size:small <span style="font-size:small System.<span style="color:#2b91af; font-size:small <span style="color:#2b91af; font-size:small <span style="color:#2b91af; font-size:small Object<span style="font-size:small <span style="font-size:small ,
<span style="color:#0000ff; font-size:small <span style="color:#0000ff; font-size:small <span style="color:#0000ff; font-size:small ByVal<span style="font-size:small <span style="font-size:small e
<span style="color:#0000ff; font-size:small <span style="color:#0000ff; font-size:small <span style="color:#0000ff; font-size:small As<span style="font-size:small <span style="font-size:small System.<span style="color:#2b91af; font-size:small <span style="color:#2b91af; font-size:small <span style="color:#2b91af; font-size:small EventArgs<span style="font-size:small <span style="font-size:small )
<span style="color:#0000ff; font-size:small <span style="color:#0000ff; font-size:small <span style="color:#0000ff; font-size:small Handles<span style="font-size:small <span style="font-size:small Button1.Click
<span style="color:#0000ff; font-size:small <span style="color:#0000ff; font-size:small <span style="color:#0000ff; font-size:small Dim<span style="font-size:small <span style="font-size:small x
<span style="color:#0000ff; font-size:small <span style="color:#0000ff; font-size:small <span style="color:#0000ff; font-size:small As<span style="font-size:small <span style="font-size:small <span style="color:#0000ff; font-size:small <span style="color:#0000ff; font-size:small <span style="color:#0000ff; font-size:small Integer
<span style="color:#0000ff; font-size:small <span style="color:#0000ff; font-size:small <span style="color:#0000ff; font-size:small Dim<span style="font-size:small <span style="font-size:small c
<span style="color:#0000ff; font-size:small <span style="color:#0000ff; font-size:small <span style="color:#0000ff; font-size:small As<span style="font-size:small <span style="font-size:small <span style="color:#0000ff; font-size:small <span style="color:#0000ff; font-size:small <span style="color:#0000ff; font-size:small Integer<span style="font-size:small <span style="font-size:small =
<span style="color:#0000ff; font-size:small <span style="color:#0000ff; font-size:small <span style="color:#0000ff; font-size:small My<span style="font-size:small <span style="font-size:small .Settings.NameOfFile.Count
<span style="font-size:small <span style="font-size:small
Randomize()

<span style="color:#0000ff; font-size:small <span style="color:#0000ff; font-size:small <span style="color:#0000ff; font-size:small For<span style="font-size:small <span style="font-size:small x = 0
<span style="color:#0000ff; font-size:small <span style="color:#0000ff; font-size:small <span style="color:#0000ff; font-size:small To<span style="font-size:small <span style="font-size:small c - 1
<span style="color:#0000ff; font-size:small <span style="color:#0000ff; font-size:small <span style="color:#0000ff; font-size:small For<span style="font-size:small <span style="font-size:small <span style="color:#0000ff; font-size:small <span style="color:#0000ff; font-size:small <span style="color:#0000ff; font-size:small Each<span style="font-size:small <span style="font-size:small NameFile
<span style="color:#0000ff; font-size:small <span style="color:#0000ff; font-size:small <span style="color:#0000ff; font-size:small As<span style="font-size:small <span style="font-size:small <span style="color:#0000ff; font-size:small <span style="color:#0000ff; font-size:small <span style="color:#0000ff; font-size:small String<span style="font-size:small <span style="font-size:small <span style="color:#0000ff; font-size:small <span style="color:#0000ff; font-size:small <span style="color:#0000ff; font-size:small In<span style="font-size:small <span style="font-size:small <span style="color:#0000ff; font-size:small <span style="color:#0000ff; font-size:small <span style="color:#0000ff; font-size:small My<span style="font-size:small <span style="font-size:small .Settings.NameOfFile
<span style="font-size:small <span style="font-size:small
NameFile.IndexOf(x)
download =
<span style="color:#0000ff New<span style="font-size:small <span style="font-size:small <span style="color:#2b91af; font-size:small <span style="color:#2b91af; font-size:small <span style="color:#2b91af; font-size:small WebClient

<span style="color:#0000ff; font-size:small <span style="color:#0000ff; font-size:small <span style="color:#0000ff; font-size:small If<span style="font-size:small <span style="font-size:small <span style="color:#0000ff; font-size:small <span style="color:#0000ff; font-size:small <span style="color:#0000ff; font-size:small Not<span style="font-size:small <span style="font-size:small <span style="color:#0000ff; font-size:small <span style="color:#0000ff; font-size:small <span style="color:#0000ff; font-size:small My<span style="font-size:small <span style="font-size:small .Computer.FileSystem.FileExists(System.<span style="color:#2b91af; font-size:small <span style="color:#2b91af; font-size:small <span style="color:#2b91af; font-size:small AppDomain<span style="font-size:small <span style="font-size:small .CurrentDomain.BaseDirectory()
& <span style="color:#0000ff; font-size:small <span style="color:#0000ff; font-size:small <span style="color:#0000ff; font-size:small My<span style="font-size:small <span style="font-size:small .Settings.NameOfFile.Item(x)
& <span style="color:#0000ff; font-size:small <span style="color:#0000ff; font-size:small <span style="color:#0000ff; font-size:small My<span style="font-size:small <span style="font-size:small .Settings.CurrentFile)
<span style="color:#0000ff; font-size:small <span style="color:#0000ff; font-size:small <span style="color:#0000ff; font-size:small Then
<span style="font-size:small <span style="font-size:small
download.DownloadFileAsync(<span style="color:#0000ff New<span style="font-size:small <span style="font-size:small <span style="color:#2b91af; font-size:small <span style="color:#2b91af; font-size:small <span style="color:#2b91af; font-size:small Uri<span style="font-size:small <span style="font-size:small (Label1.Text),
_

<span style="color:#0000ff; font-size:small <span style="color:#0000ff; font-size:small <span style="color:#0000ff; font-size:small <span style="color:#000000 System.<span style="color:#2b91af AppDomain<span style="font-size:small <span style="font-size:small .CurrentDomain.BaseDirectory()
& <span style="color:#0000ff; font-size:small <span style="color:#0000ff; font-size:small <span style="color:#0000ff; font-size:small My<span style="font-size:small <span style="font-size:small .Settings.NameOfFile.Item(x)
& <span style="color:#0000ff My<span style="font-size:small <span style="font-size:small .Settings.CurrentFile)
<span style="font-size:small <span style=" <span style="color:#0000ff End
<span style="color:#0000ff <span style="color:#0000ff <span style="color:#0000ff If
<span style="color:#0000ff; font-size:small <span style="color:#0000ff; font-size:small <span style="color:#0000ff; font-size:small Next
<span style="color:#0000ff; font-size:small <span style="color:#0000ff; font-size:small <span style="color:#0000ff; font-size:small Next<br/>
<span style="font-size:small <span style="font-size:small
<span style="color:#0000ff; font-size:small <span style="color:#0000ff; font-size:small <span style="color:#0000ff; font-size:small End<span style="font-size:small <span style="font-size:small <span style="color:#0000ff; font-size:small <span style="color:#0000ff; font-size:small <span style="color:#0000ff; font-size:small Sub
<span style="font-size:small <span style="font-size:small

<span style="font-size:small <span style="font-size:small

<span style="color:#0000ff; font-size:small <span style="color:#0000ff; font-size:small <span style="color:#0000ff; font-size:small


View the full article
 
Back
Top