Jump to content

  •  

  • iBotModz CBox


    Photo

    VB Download File From http (Save-As)


    This topic has been archived. This means that you cannot reply to this topic.
    1 reply to this topic

    #1 robert_hehn

    robert_hehn

      Private Grade 2

    • Donors+

    • 164 posts
    • Joined: 13-October 07

    Posted 25 May 2009 - 07:00 PM

    Ok so here is what I have happening. When you have a menu strip setup, you can easily do the hidden web browser code to have it where you click on a file in the menu strip and click on a download button somewhere on the app, it will then download the file you have clicked on in the menu strip after an IE save window pops up. Now I have a new code listed below:

    Dim SFD As New SaveFileDialog
    		SFD.Filter = "rar files (*.rar)| *.rar"
    		SFD.FileName = "File Name"
    		If SFD.ShowDialog() = DialogResult.Cancel Then
    			Me.Show()
    		Else
    			My.Computer.Network.DownloadFile("File URL", SFD.FileName, Nothing, Nothing, True, 100, True, FileIO.UICancelOption.ThrowException)
    		End If
    Below is what I am trying to do now:
    This code works perfectly fine if you are wanting to have it so when someone clicks the link in the top menu strip it downloads instantly with a progress bar and no had problems at all. But when I try to set it up so you click the file you want in the menu bar and then below that is a download button which brings up a Save As window, and that is where my problem is because I can't get that way setup. I was also wanting to know if anyone knew if it is even possible to do it this way.

    Thanks to anyone who tries to help.
    EDIT: I just noticed that I didn't post this in a support section so if this needs to be moved feel free to move it.

    EDIT 2: Nevermind I just figured it out.

    Edited by robert_hehn, 03 June 2009 - 08:39 PM.


    #2 Dark Slipstream

    Dark Slipstream

      Blue Shadowz Owner

    • Members+

    • 2,829 posts
    • Joined: 19-April 08

    Posted 25 May 2009 - 07:25 PM

    Nicely done, never thought about posting this.