I am doing the upload to and download from azure blob storage from a windows forms application.
In both the cases, when user clicks upload/download button, i want a message "Configuration being uploaded/downloaded.please wait.." to pop up and this messagebox should automatically close by itself when the upload/download is finished
Then another messagebox with message "Upload/Download completed" should pop up.
I am unable to close the messagebox. is there any way to do this without user interaction? Also i don't need the OK button on the MessageBox.
I could go with a progress bar with percentage, but i don't want the progress bar for this particular case.
I am trying to work with the code below:
internal partial class CustomMessageForm : Form
{
public CustomMessageForm(string content)
{
MessageBox.Show(content);
}
// public void ShowBox(string content)
//{
//MessageBox.Show(content);
//}
}
/// <summary>
/// Your custom message box helper.
/// </summary>
public static class CustomMessageBox
{
public static void Show(string content)
{
// using construct ensures the resources are freed when form is closed
using (var form = new CustomMessageForm(content))
{
form.ShowDialog();
}
}
}
The idea is to instantiate this form and call the show method to pop up the message when the upload starts. when the upload is finished i want to close this form.
The message box has close button, which requires the user to give the input. i don't need the close button and should be able to close the form when upload is completed using form.close() method.