Chilkat
HOME
Android™
ASP
Visual Basic
VB.NET
C#
iOS (IPhone)
Objective-C
C++
C
MFC
Delphi
FoxPro
Java
Perl
PHP Extension
PHP ActiveX
Python
PowerShell
Ruby
SQL Server
VBScript
Send Email with Progress Monitoring
Send an email in VB.NET with progress monitoring. ' If we want to use events, we must declare the mailman as a member of the class. Private WithEvents mailman As New Chilkat.MailMan() ' This is the event callback. Private Sub mailman_OnSendPercentDone(ByVal sender As Object, ByVal args As Chilkat.MailPercentDoneEventArgs) Handles mailman.OnSendPercentDone ' args.PercentDone is an integer value indicating the percent done (1 to 100) ' args.Abort is an output argument. If we set it to True the mail sending will ' be aborted. In this example, we'll abort after the mail is 50% sent... ProgressBar1.Value = args.PercentDone If (args.PercentDone >= 50) Then args.Abort = True End If End Sub ' The VB.NET IDE will automatically create the "mailman_OnSendPercentDone" method ' if you select the "mailman" object and then the "SendPercentDone" event as shown here: |
© 2000-2012 Chilkat Software, Inc. All Rights Reserved.