M
Mae
Hi,
I'm a novice in .Net C#. I wrote a code to show the progress of exporting file from datagridview. The progress bar will be shown in a pop-up window.
The code is shown as below:
BackgroundWorker bgw = new BackgroundWorker();
bgw.DoWork += delegate
{
//code to export data from datagridview
};
bgw.RunWorkerAsync();
FrmProgress progress = new FrmProgress();
progress.Show();
bgw.RunWorkerCompleted += delegate
{
progress.Close();
};
The progress window is shown while exporting is running on another thread, but I do not know how to update the progressbar in the modal window, so that it show the percentage of file being written.
Can anyone help me with this?
Thanks in advance.
I'm a novice in .Net C#. I wrote a code to show the progress of exporting file from datagridview. The progress bar will be shown in a pop-up window.
The code is shown as below:
BackgroundWorker bgw = new BackgroundWorker();
bgw.DoWork += delegate
{
//code to export data from datagridview
};
bgw.RunWorkerAsync();
FrmProgress progress = new FrmProgress();
progress.Show();
bgw.RunWorkerCompleted += delegate
{
progress.Close();
};
The progress window is shown while exporting is running on another thread, but I do not know how to update the progressbar in the modal window, so that it show the percentage of file being written.
Can anyone help me with this?
Thanks in advance.