| Visual Basic (Declaration) | |
|---|---|
Public Delegate Sub SmtpProgressEventHandler( _ ByVal sender As Object, _ ByVal e As ProgressEventArgs _ ) | |
| Visual Basic (Usage) | Copy Code |
|---|---|
Dim instance As New SmtpProgressEventHandler(AddressOf HandlerMethod) | |
| C# | |
|---|---|
public delegate void SmtpProgressEventHandler( object sender, ProgressEventArgs e ) | |
| Managed Extensions for C++ | |
|---|---|
public: __gc __delegate void SmtpProgressEventHandler( Object* sender, ProgressEventArgs* e ) | |
| C++/CLI | |
|---|---|
public delegate void SmtpProgressEventHandler( Object^ sender, ProgressEventArgs^ e ) | |
Parameters
- sender
- e
When the Smtp.Send method is called, the Smtp.Progress event will be raised in the frequency specified by Smtp.Connection.SendBufferSize. An ProgressEventArgs object is passed into the Smtp.Progress event containing information about the current file transfer.
This class is useful for displaying information to the user about the current send operation. To display progress using a ProgressBar, use ProgressEventArgs.Length as ProgressBar.Max and SmtpProgressBar.Position as ProgressBar.Value.
If your code causes an exception, it would be returned to the handling event without you seeing it. To preclude such a condition, you should ALWAYS use a try/catch block around your event-handling code.
Target Platforms: Microsoft .NET Framework 2.0