Click here to Skip to main content
15,917,538 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want add a event to my class like a file copy progress or encrypt progress .....
I know that it possible by using a loop but I do not know how do this by event!
Posted
Comments
Richard MacCutchan 18-Apr-14 4:32am    
Do you mean a timer event to display progress? If so take a look at http://msdn.microsoft.com/en-us/library/system.timers.timer(v=vs.110).aspx.
saber rezaii magham 18-Apr-14 4:57am    
no i want make a personal event like click or any other...

Adding an event is easy: A Simple Code Snippet to Add an Event[^] - this provides a VS snippet to make the job even easier, but it also provides the raw code if you prefer that way.
 
Share this answer
 
Try to use BackgroundWorker component. You can do some time consuming taks such as copying files, and you can report progress of this task by using events.
Good example you can find here:
ProgressForm: A simple form linked to a BackgroundWorker[^]

I hope it helps you :)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900