| Visual Basic (Declaration) | |
|---|---|
<CategoryAttribute("Progress")> Public Event Progress As ImapProgressEventHandler | |
| Visual Basic (Usage) | Copy Code |
|---|---|
Dim instance As Imap Dim handler As ImapProgressEventHandler AddHandler instance.Progress, handler | |
| C# | |
|---|---|
[CategoryAttribute("Progress")] public event ImapProgressEventHandler Progress | |
| Managed Extensions for C++ | |
|---|---|
[CategoryAttribute("Progress")] public: __event ImapProgressEventHandler* Progress | |
| C++/CLI | |
|---|---|
[CategoryAttribute("Progress")] public: event ImapProgressEventHandler^ Progress | |
The event handler receives an argument of type ImapProgressEventArgs containing data related to this event. The following ImapProgressEventArgs properties provide information specific to this event.
| Property | Description |
|---|---|
| Length | Gets the total length of expected data. |
| Message | Gets the ImapMessage object representing the current message being transferred. |
| Position | Gets the byte count of downloaded data. |
When a message or message section is retrieved from the server, the Imap.Progress event will be raised in the frequency specified by Tcp.ReceiveBufferSize. This event will contain data useful for displaying progress to the user. For example, if you wish to display progress for the retrieval of data using a ProgressBar, you could use 0 for ProgressBar.Minimum, ImapProgressEventArgs.Length for ProgressBar.Maximum, and ImapProgressEventArgs.Position as ProgressBar.Value.
Target Platforms: Microsoft .NET Framework 2.0