I am attaching file for mail through C#. I am using below code:
Attachment data = new Attachment(fileName);
mailMsg.Attachments.Add(data);
I want to show a progress bar whil开发者_运维问答e attaching file. How can I do this?
Unless the mailMsg
object has some kind of progress event, you probably can't get the progress for a single attatchment.
However, if you are attatching multiple files, you can report the ratio of files completed to total files as a percentage instead. To do that, add a ProgressBar
to your window, then update the value of it after each file is done.
精彩评论