Hi guys. I would just like to know if there is a way to integrate a progressbar that shows the progress of the process?

I mean when process.Start is activated, that's when the progressbar starts to load until and stops only when process.HasExited.


I hope someone can help.

Thanks.

the progressbar starts to load until and stops only when process.HasExited

Process object doesn't raise any events except Exited. So there's no way to know what the process is doing. What sort of process you're dealing with?

I agree with the user above. I do not see how you could achieve this and honestly, why would you want to do this? I am not trying to shoot your ideas down, I am just wanting to see how you are integrating this into an application.

I see.because in my project, there is a process to be done(convert video formats to mp3) then i would somehow like to inculcate a progress bar that would tell the user the current status of the file that is being converted.

Is there really no way to achieve it?

there is a process to be done(convert video formats to mp3)

Is this a process/application you have made? If it is, then you do know the length of the video and at what stage the process is grabbing the audio track. That's the information you could pass "outside" your process.

yes, but the process is not that long as the length of the video... the process just take seconds even if the video file is minutes..

You could time the conversion of files and just adjust the speed of the ProgressBar. This wouldn't show in real-time what the conversion is at but it would give the effect of the conversion progress. Of course, I wouldn't do this but if you are dead set on doing this, this would be a viable option.

the process is not that long as the length of the video

I put it slightly wrong. When you process the original file, you do know the length of the file and the position in the file you're processing. This is the information to pass out. Or to make it simple, pass out the percent (0-100) of the file processed.

HTH

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.