473,785 Members | 2,297 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to update the progress bar in a modal window?

5 New Member
Hi,

I'm a novice in C#. I wrote a program to export data from datagridview. While exporting, a pop-up window shows the progress of file exporting.

The code is as follow:

BackgroundWorke r bgw = new BackgroundWorke r();

bgw.DoWork += delegate
{
//Code for exporting data
};

bgw.RunWorkerAs ync();
FrmProgress progress = new FrmProgress();
progress.Show() ;

bgw.RunWorkerCo mpleted += delegate
{
progress.Close( );
};

The progress bar modal window showed up while exporting data, but the progress bar is not updated. I tried reportprogress but it didn't work. Probably I didn't use it in the right way.

Can anyone help me with this? I have no idea how to do it.

Thanks in advance!
Dec 3 '08 #1
2 2533
vanc
211 Recognized Expert New Member
Yes, you have to use reportprogress to show up the changes. Google BackgroundWorke r and you can get many instructions for newbie that really will help you.

cheers,
Dec 4 '08 #2
melryin
5 New Member
Hi,

Thanks for your reply. You are right, I need to ReportProgress. I think that's because I didn't set bgw.WorkerRepor tProgress = true. That's why I got an error message.

I appreciate for your help. =D
Dec 4 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
3629
by: Patrick Lim | last post by:
Here is the problem: I have written a non-modal frame class in Java for displaying help text when a user is using an application. It works as desired in that if the user selects "help" again, the same frame is used -- this is done using a singleton. The user can do other stuff in the main window while the help window is up. However, when I have a modal dialog pop-up to get information from the user, it blocks events to the help...
1
12532
by: amith | last post by:
Hi, I have a javascript, calendar.js which i use to enable my client to select the date. This calendar pops up on the click of a gif image. But the problem is that this poped up window is not modal in nature(i do not want the user to go the parent page unless he selects some date in the calendar popup). In the javascript calendar.js he has used window.open() function to pop up the window. i just want to know whether we have any...
2
3885
by: Matt | last post by:
I want to know how to submit the form data to a modal dialog window? The following is page1.asp, and when the user clicks submit button, it will post the form data to page2.asp by opening a new window. But I want modal dialog window, any ideas?? <form action="page2.asp" method="post" target="_blank"> <input type="text" name="username"> <input type="submit" name="submit"> </form>
1
3373
by: gopal srinivasan | last post by:
I need to know how to close a parent modal window when child modal window opens, also i need to know the syntax for writing document on the modal window on the fly, like what we do in case of normal window. Actually, I tried to close the parent window from the child modal window using parent.close syntax in onload event in child modal window. It actually closes the parent modal window, but the child modal window is not opened, why it is...
7
2539
by: Steve Kallal | last post by:
I have seen this subject tossed around in this forum before. But in my case I need a simple solution. I do NOT need to show progress in terms on percentage complete. But rather I need to show a visual indicator to the user that a process is running. There are two scenarios where I need to show a busy indicator: Scenario #: The first is when posting to the web server and waiting for a response.
3
3794
by: Vinay | last post by:
Hello I am trying to update a Progress bar on a form. I am able to update it via using a simple clock timer, but as soon as I perform a long operation G1 (generation of a report) in a separate form, it stops updating it, but keeps on incrementing the Progress bar values in the background and displays the updated Pbar after finishing the operation G1. My requirement is that it should update during the execution of operation G1. On...
2
1286
by: Keith Rebello | last post by:
I am writing a program that analyzes a reinforced concrete column section. The main form has an "Analysis" menu item that calls the main analysis routines in a ColumnSection class. It also opens a modal form containing a progress bar which shows the progess of the analysis. i.e. FormProgress.ShowDialog ColumnSection.Analyze In the ColumnSection class I raise an event that updates the progress: RaiseEvent OverallProgress(iProgress)
2
3688
by: sthrudel | last post by:
Hi! I'm working on a web application in Asp.net and what I would like to have is a cross borwser modal dialog which accepts user's input. I would like to catch what the user clicked on the dialog. To be more specific I want to have a confirmation dialog that is shown when a user clicks on a Delete button (which deletes some values from database). If Yes is pressed the delete action is processed otherwise modal dialog is closed.
1
3122
by: Roland | last post by:
Hello, I am writing modal dialog box to display progress of downloading file. I am starting download of a file in constructor of dialog using some asynchronous method call which returns me an asynchronous object. I could use this object to get status. I will be using this status to update status message on dialog. Which method should I override to update the status message ? Can I follow the approach just like
0
10356
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10162
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10100
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8988
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7509
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6744
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5528
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4061
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3665
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.