I'm having problems with the progress bar in my project :(

Introduction:

I made a small program to send notice via email to each member in a list (Excel file - sequential reading user name of account in excel file will be made ​​by the program)and the attached file corresponding to each user (Ex: User1 file 1, User 2 file).

Requirement:

Creat ProgressBar corresponds to an email sent successfully.

Ex:
ProgressBar: run corresponding description label below
Label:1 mail sent/2 mail sent .... Finished!

Best Regards!

If the email being sent is the same for each user why don't you just use cc or bcc to send the email once but to many recipients? Then a progress bar isn't really needed.
If you want to send the emails sequentially (because the emails are different), count how many addresses there are and max this the max value of the progress bar and then, after each individual email has been sent, increase the progress bar by one.

I want to send the emails sequentially because the emails are different and attachments for each user is different. Can you provide me sample code for do it?

As you said "count how many addresses there are and max this the max value of the progress bar and then, after each individual email has been sent, increase the progress bar by one" mean is increase the progress bar by one is counting of the implementation period of the corresponding with progress bar?
If so, how to count one time email with attachment file to an per email account? Every time I send email execution, respectively for approximately 50 email address!

I need a sample code to understand!

I'm assuming you already have the email code because you didn't ask for that.
As I understand it you have the emails stored in a file which allows you to count how many emails you are going to be sending (as each email is unique you send one email per address). The number of emails in the file then becomes the number of emails you are going to send in total.
You are going to run through the email sending code many times so after each iteration (i.e. after calling the send method of the Mail object) increment the current value of the progress bar by one (thereby moving it towards the max value).
This isn't the code you asked for but its late and I'm tired:) It explains the principle behind how to handle the problem though.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.