troubleshooting Question

Progress Box

Avatar of RockBaby
RockBabyFlag for Singapore asked on
C#Programming Languages-Other
7 Comments2 Solutions504 ViewsLast Modified:
Hi,
I need to creating something like a progress box. From my app, when i click save in the SDialog, how can i do something like once i click OK, there will be a Progress Box appear but at the backend, it's saving my document.


SaveFileDialog SDialog = new SaveFileDialog();
SDialog.Filter = "Text Files(*.csv)|*.csv";

if (SDialog.ShowDialog() == DialogResult.OK)
{
   frmExecutingRpt frm=new frmExecutingRpt(this);
   frm.ShowDialog();
   //The progress Box will be appear here but the following code still running..

   using (StreamWriter FWriter = new StreamWriter(SDialog.FileName))
   {
      FWriter.WriteLine(DateTime.Now + "\n");
      FWriter.WriteLine(",,,,Events Report\n");
      FWriter.WriteLine("Alarm Time, Alarm, License No, TID, Latitude, Longitude, POLCOM(Ack),"
      +"COSCOM(Ack), POCC(Ack)");

         foreach (DataRow datarow2 in streamTable.Rows)
         {
            FWriter.WriteLine(datarow2["license_n"]);

               foreach (DataRow datarow in streamTable.Rows)
      {
            FWriter.WriteLine(datarow["alarmtime_dt"] + "," + datarow["des_x"] + "," + datarow
                           "license_n"] + "," + datarow["transid_c"] + ","  + datarow["lat_n"] + "," + datarow["lon_n"]
                          + "," + datarow["pcgack_i"] + ","  + datarow["rsnack_i"] + "," + datarow["pocc1ack_i"]);
      }
            }
FWriter.Close();
frm.Close();
//The progress box will be close here...
           Invoke( new ReportGenerationCompleteDelegate( OnReportCompleted ) );
    }
}
ASKER CERTIFIED SOLUTION
Gautham Janardhan

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Log in to continue reading
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform for $9.99/mo
View membership options
Unlock 2 Answers and 7 Comments.
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
The Value of Experts Exchange in My Daily IT Life

Experts Exchange (EE) has become my company's go-to resource to get answers. I've used EE to make decisions, solve problems and even save customers. OutagesIO has been a challenging project and... Keep reading >>

Mike

Owner of Outages.IO
Phoenix, Arizona, United States
Member Since 2016
Join a full scale community that combines the best parts of other tools into one platform.
Unlock 2 Answers and 7 Comments.
View membership options
“All of life is about relationships, and EE has made a virtual community a real community. It lifts everyone's boat.”
William Peck

Member since 2004