[1.0/1.1] Displaying a status message when a file is downloading
Hi. I have a situation where a file is downloading from a ftp server. All of that is working properly its just that when the file is downloading, I want to display like a form to the user saying: 'File is downloading' and when the file finishes download remove the form with the message automatically. I tried the messagebox but it required the user to click the OK button. Is there any way I could achieve this?
Jennifer
Re: [1.0/1.1] Displaying a status message when a file is downloading
You're going to want to display this message form modally, which means that the calling form can't do anything else while it's displayed. Your best bet is to have your main form display a modal dialogue and then have that dialogue download the file. Once the file finishes downloading the form can dismiss itself by setting its DialogResult to OK. If you want your UI to remain responsive while the file is being downloaded, e.g. the message form will redraw itself if another window is dragged over it, then you'll need to use a worker thread to download the file. That will also allow you to provide a Cancel button on the message dialogue if you want to.
Re: [1.0/1.1] Displaying a status message when a file is downloading
Sorry if this is a novice question but what is: a modal dialogue?
Re: [1.0/1.1] Displaying a status message when a file is downloading
A modal dialog is something like the alert() on a web page. It steals all the focus from the application and you cannot touch the application until the modal dialog is removed. Which means that once the progress bar reaches 100%, you can unload the modal dialog and the user can return to the application.
Re: [1.0/1.1] Displaying a status message when a file is downloading
Quote:
Originally Posted by JenniferBabe
Sorry if this is a novice question but what is: a modal dialogue?
Just like the "MessageBox" and any dialog you display using "ShowDialog();"
Re: [1.0/1.1] Displaying a status message when a file is downloading