hi all,
trying to a write a small app to learn more about c#. was hope to make a simple app to display a progress bar while i started and ran a process in the background (defrag). problem i run into is waiting for the process to end. what eve i try to use to suspend the thread (thread.sleep or WaitForExit()) either one causes the progress bar to stop. is there a way around this?
code is pretty simple, go the progress bar code here (http://www.codeproject.com/cs/miscctrl/C_NeverEndingPBar.asp)
private
{
osProgress1.Visible =
osProgress1.AutoProgress =
psi.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
System.Diagnostics.
listFiles = System.Diagnostics.
listFiles.WaitForExit();
as soon as it launchs defrag and starts waiting it causes the progress bar to hang. any thoughts?
thanks in advance!