none
How can use progressbar in Vb.NET with Net.Mail

    Question

  • Hi everybody

    i created an application of mail client , i can send mail via SMTP there isnt any problem while sending, but i want to show sending progress value while sending mail, how can i do that ? for example while send an email via Outlook or Thunderbird you can use the progessbar in statusbar i want to make same tool.

    Thanks for your help.

    Tuesday, April 20, 2010 7:42 PM

Answers

  • Thank you Naldopr for your friendly help.

     

    Hi BlueEffect,

    Welcome to MSDN forums!

     

    1. As far as I know, there is no obvious mechanism in .NET to catch the Email Sending progress. Simply, you can use the marquee style to indicate progress is being made, without indicating the quantity of progress.

    ProgressBar.Style = ProgressBarStyle.Marquee

    http://msdn.microsoft.com/en-us/library/system.windows.forms.progressbar.style.aspx

     

    2. Instead, you can consider using the third-part component Chilkat .NET to catch sending progress.

    Article/sample: Send an email in VB.NET with progress monitoring. 

    http://www.example-code.com/vbdotnet/smtp_vbDotNetSendProgress.asp

     

     

    This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.

     


    Best regards,
    Martin Xie


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Tuesday, April 27, 2010 7:06 AM

All replies

  • Hi!

    Try this code:

    1. Insert the ProgressBar1

    2. Insert the Timer1

    3. Copy this code exactly

     Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
            On Error Resume Next
            ProgressBar1.PerformStep()
            If ProgressBar1.Value >= ProgressBar1.Maximum Then
                '--------------------------
                Timer1.Enabled = False
                '----------------------------
            End If
        End Sub

    4. Insert this code in Form1.load

                ProgressBar1.Step = 3
                ProgressBar1.Value = 0
                '---------------------------
               Timer1.Enabled = True
                '-------------------------

    Finished!

    Any comment, contact me

    Naldo

    admsystems@live.com

    Tuesday, April 20, 2010 7:57 PM
  • Hi!

    Try this code:

    1. Insert the ProgressBar1

    2. Insert the Timer1

    3. Copy this code exactly

     Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
            On Error Resume Next
            ProgressBar1.PerformStep()
            If ProgressBar1.Value >= ProgressBar1.Maximum Then
                '--------------------------
                Timer1.Enabled = False
                '----------------------------
            End If
        End Sub

    4. Insert this code in Form1.load

                ProgressBar1.Step = 3
                ProgressBar1.Value = 0
                '---------------------------
               Timer1.Enabled = True
                '-------------------------

    Finished!

    Any comment, contact me

    Naldo

    admsystems@live.com


    Thanks for your answer

    but , i think this is for standart use to progressbar, i can use progressbar with timer component, i want to learn how can calculate percent of sending progress for example i send an email with attached file, progress bar have to calculate percent of sended part of file/s and show me.

    • Edited by Ali_Uygur Tuesday, April 20, 2010 8:18 PM mistake
    Tuesday, April 20, 2010 8:16 PM
  • Thank you Naldopr for your friendly help.

     

    Hi BlueEffect,

    Welcome to MSDN forums!

     

    1. As far as I know, there is no obvious mechanism in .NET to catch the Email Sending progress. Simply, you can use the marquee style to indicate progress is being made, without indicating the quantity of progress.

    ProgressBar.Style = ProgressBarStyle.Marquee

    http://msdn.microsoft.com/en-us/library/system.windows.forms.progressbar.style.aspx

     

    2. Instead, you can consider using the third-part component Chilkat .NET to catch sending progress.

    Article/sample: Send an email in VB.NET with progress monitoring. 

    http://www.example-code.com/vbdotnet/smtp_vbDotNetSendProgress.asp

     

     

    This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.

     


    Best regards,
    Martin Xie


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Tuesday, April 27, 2010 7:06 AM
  • Normally the time which is actual used is to few to make showing a progressbar has any sense  less then a second.

    However, if you have created a spam enginge, then you can let your progressbar go accoording to the collection of spam addresses which you use.

    If not then use the reply from Martin.

    Outlook has a process where it using the Network server of the provider (or the own mail server) exchanges actions like sent, receive etc. but that is something different with only sending with using an smtp server.

     


    Success
    Cor
    Tuesday, April 27, 2010 7:35 AM
  • Hi All!

    Nothing to do also with the Framework 4 for a progress status process?

    This is a little bit a pity...;-((

    However, Martin or Cor, would you mind sending a few code as a sample to use Network componets to implement a progress bar indication?

    Thanks for your help!

    Ciao

    Fabio

     

    Sunday, November 07, 2010 10:14 AM