this is in windows project
i have one form which has a progress bar
from that i am calling a class file which has decrypting function in it while it performs decryption of a file i want to show the progress of decryption in my form

now how do i fetch the values from class file
i tried using return, from which i got the value back but the remaining function execution in the class file halted because it returned value

i even tried is there a way to access the progress bar in class file
which also failed

any answer for this solution

Recommended Answers

All 3 Replies

send the progressbar object as a parameter when calling the descript function

commented: Good suggestion. +7

I'll second the BackgroundWorker. By running the decryption in a background worker it wont lock up your UI thread, and turning on ReportsProgress will allow you to relay the data back tou your main form to update the progress bar.

commented: Absolutely. +7
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.