Results 1 to 19 of 19

Thread: Download Button Help

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2009
    Location
    vbforums
    Posts
    809

    Download Button Help

    I have an application based on web references:

    my application is like

    ComboBox > ListBox1 > ListBox2 > ListBox3 > CheckedListBox ---> Download Button


    till here everything fine ..

    Now I need to help for download button to be coded [dwbtn] but download should use the Form1 only with progressbar as well a Label to show the status of a file for downloading. where as I have used CheckedListBox to get the files .. I want to use ListView so that I get Files Size and Type .. Please Help
    Last edited by janu; Jan 2nd, 2012 at 10:35 PM.

  2. #2
    PowerPoster
    Join Date
    Aug 2003
    Location
    Edinburgh, UK
    Posts
    2,773

    Re: Download Button Help

    well, how are you going to go about downloading a file? are you going to be using WebClient? Are you going to be using a TCP stream to download the file? some 3rd party tool?

    There are certain things which you can and cannot obtain (things like size/type etc...) as you do not generaly obtain these correctly until the file has fully downloaded. The header may show a file of x size but in an actual fact it is of y size.

    is this going to be an FTP client? Http client? you need to think about these or explain in more depth your approach

    MVP 2007-2010 any chance of a regain?
    Professional Software Developer and Infrastructure Engineer.

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2009
    Location
    vbforums
    Posts
    809

    Re: Download Button Help

    Quote Originally Posted by Techno View Post
    well, how are you going to go about downloading a file? are you going to be using WebClient? Are you going to be using a TCP stream to download the file? some 3rd party tool?

    There are certain things which you can and cannot obtain (things like size/type etc...) as you do not generaly obtain these correctly until the file has fully downloaded. The header may show a file of x size but in an actual fact it is of y size.

    is this going to be an FTP client? Http client? you need to think about these or explain in more depth your approach
    yes, webClient is to be going to use for downloadinf file

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2009
    Location
    vbforums
    Posts
    809

    Re: Download Button Help

    Please Gurus Help me ...

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2009
    Location
    vbforums
    Posts
    809

    Re: Download Button Help

    here I want to use main form for downloaing file but I get error that showdialogbox can not used on the same form
    Last edited by janu; Jan 2nd, 2012 at 10:35 PM.

  6. #6
    Fanatic Member
    Join Date
    Mar 2008
    Posts
    519

    Re: Download Button Help

    Doesn't MessageBox.Show() work like this?

    vb.net Code:
    1. MessageBox.Show("Hello World!", "Dialog Box Title", vbYesNo,~)
    and so forth?
    You shouldn't be passing the first parameter "Me". I believe that only is for when you are calling the P/Invoke function which shows a dialog box.

    I'm not sure though since I haven't worked in .NET for a couple of months now.

  7. #7

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2009
    Location
    vbforums
    Posts
    809

    Re: Download Button Help

    Ok , it is possible that if we select only path and then save and show file download status with progressbar on the same form
    Last edited by janu; Jan 2nd, 2012 at 10:36 PM.

  8. #8
    PowerPoster
    Join Date
    Aug 2003
    Location
    Edinburgh, UK
    Posts
    2,773

    Re: Download Button Help

    janu - some how over night you became an MVP. you should know how to do this. you are also serving the logo from my server without permission. Janu, you are not an MVP but if you are, please provide a link to your profile page. For now - please immediately remove the logo from your signature.

    MVP 2007-2010 any chance of a regain?
    Professional Software Developer and Infrastructure Engineer.

  9. #9

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2009
    Location
    vbforums
    Posts
    809

    Re: Download Button Help

    Quote Originally Posted by Techno View Post
    janu - some how over night you became an MVP. you should know how to do this. you are also serving the logo from my server without permission. Janu, you are not an MVP but if you are, please provide a link to your profile page. For now - please immediately remove the logo from your signature.
    OK Removed : Now If here this way we select path by using [Browsebtn] inorder to select the path and then savedialog will be used for download button.

  10. #10
    PowerPoster
    Join Date
    Aug 2003
    Location
    Edinburgh, UK
    Posts
    2,773

    Re: Download Button Help

    its not clear what you are wanting to do. you do realise you cannot use a save dialog button to point to a server correct?

    did you read the documentation about savedialog? if not - I suggest you start from here:

    http://msdn.microsoft.com/en-us/libr...iledialog.aspx
    http://msdn.microsoft.com/en-us/library/e61ft40c.aspx

    MVP 2007-2010 any chance of a regain?
    Professional Software Developer and Infrastructure Engineer.

  11. #11

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2009
    Location
    vbforums
    Posts
    809

    Re: Download Button Help

    Quote Originally Posted by Techno View Post
    its not clear what you are wanting to do.
    I actually want like this
    Last edited by janu; Jan 2nd, 2012 at 10:37 PM.

  12. #12
    PowerPoster
    Join Date
    Aug 2003
    Location
    Edinburgh, UK
    Posts
    2,773

    Re: Download Button Help

    Take a look at this on how to download a file using WebClient which also raises events to tell you the download progress:

    http://msdn.microsoft.com/en-us/libr...webclient.aspx

    MVP 2007-2010 any chance of a regain?
    Professional Software Developer and Infrastructure Engineer.

  13. #13

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2009
    Location
    vbforums
    Posts
    809

    Re: Download Button Help

    Quote Originally Posted by Techno View Post
    Take a look at this on how to download a file using WebClient which also raises events to tell you the download progress:

    http://msdn.microsoft.com/en-us/libr...webclient.aspx


    OK now how to code for Save Button [Download File]
    Last edited by janu; Jan 2nd, 2012 at 10:36 PM.

  14. #14
    PowerPoster
    Join Date
    Aug 2003
    Location
    Edinburgh, UK
    Posts
    2,773

    Re: Download Button Help

    giving code to you wont make you learn anything
    how are you initiating your download in the first place if you already have code?

    MVP 2007-2010 any chance of a regain?
    Professional Software Developer and Infrastructure Engineer.

  15. #15

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2009
    Location
    vbforums
    Posts
    809

    Re: Download Button Help

    Quote Originally Posted by Techno View Post
    giving code to you wont make you learn anything
    Sorry!
    Last edited by janu; Jan 1st, 2012 at 11:28 AM.

  16. #16
    PowerPoster
    Join Date
    Aug 2003
    Location
    Edinburgh, UK
    Posts
    2,773

    Re: Download Button Help

    well yes janu. code wont just be given all the time. you wont learn anything if you dont try or at least post the attempts you have tried with code snippets and any erros that have occured. we are all trying to help but you dont seem to be acknowledging this.

    you also did not answer the question. The fact that you already had the code in place.... how were you able to test it? you cant test it or implement the code if you dont have an entry point (i.e download file)

    I wish you well in finding this out

    MVP 2007-2010 any chance of a regain?
    Professional Software Developer and Infrastructure Engineer.

  17. #17

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2009
    Location
    vbforums
    Posts
    809

    Re: Download Button Help

    yes I can use Form2 to perform the download task with StatusLabel , Progressbar and cancel download button ... but my aim is to use the form1 only to complete the whole task...

  18. #18

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2009
    Location
    vbforums
    Posts
    809

    Re: Download Button Help

    actually I have this code when we click on download button (dwbtn) form2 open and file starts downloading .. I by your help want to perform whole task on form1
    Last edited by janu; Jan 1st, 2012 at 11:35 AM.

  19. #19

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2009
    Location
    vbforums
    Posts
    809

    Re: Download Button Help

    how to use Form1 instead of Form2 for download task also

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width