Joined: Sun Nov 09, 2008 12:35 am Posts: 5 Has thanked: 0 time Have thanks: 0 time
Hi , I have an application which takes time to load data into a grid so inorder to see the status of data loading I want a small window to pop up showing how much is loaded in the form of progress bar . the application is in C#.... Can someone help me with information on how to do this. I know how to get it at bottom of page dragging progress tool bar.. but i want a small window wid % amount loaded in center !!!
Thanks ricky
msi_333
Question subject: Re: status Progress bar
Posted: Tue Aug 25, 2009 6:51 pm
Joined: Tue Mar 27, 2007 10:55 pm Posts: 2103 Location: Earth Has thanked: 39 time Have thanks: 56 time
why don't you create a window and make it position (x= ( screen_width - window_width / 2) , y= ( screen_height -window height ) /2 ) .
_________________ Currenlty programming with : java , html , php , and javascript . (OCJP-6 certified )
rocky18
Question subject: Re: status Progress bar
Posted: Tue Aug 25, 2009 11:13 pm
Joined: Sun Nov 09, 2008 12:35 am Posts: 5 Has thanked: 0 time Have thanks: 0 time
Actually I have multiple forms so I want a generic status bar form showing loading progress while in the background data is getting loaded. the form in the front shows how much % of data is loaded . sorry for mistyping
msi_333
Question subject: Re: status Progress bar
Posted: Wed Aug 26, 2009 10:18 am
Joined: Tue Mar 27, 2007 10:55 pm Posts: 2103 Location: Earth Has thanked: 39 time Have thanks: 56 time
Code:
using System; using System.Drawing; using System.ComponentModel; using System.Windows.Forms;
public class Win32Form2 : System.Windows.Forms.Form {
public Win32Form2() { // Required for Win Form Designer support InitializeComponent(); }
public static void Main(string[] args) { Application.Run(new Win32Form2()); }
private void InitializeComponent() { this.components = new System.ComponentModel.Container(); this.label1 = new System.Windows.Forms.Label(); this.progressBar1 = new System.Windows.Forms.ProgressBar(); this.button1 = new System.Windows.Forms.Button(); this.textBox1 = new System.Windows.Forms.TextBox();
label1.Location = new System.Drawing.Point(32, 40); label1.Text = "Progress Value"; label1.Size = new System.Drawing.Size(88, 24); label1.TabIndex = 2;
if (progressBar1.Value == progressBar1.Maximum){ progressBar1.Value = progressBar1.Minimum; } progressBar1.PerformStep(); textBox1.Text=progressBar1.Value.ToString() ; // Displays the values of progressbar in textbox
_________________ Currenlty programming with : java , html , php , and javascript . (OCJP-6 certified )
rocky18
Question subject: Re: status Progress bar
Posted: Wed Aug 26, 2009 4:40 pm
Joined: Sun Nov 09, 2008 12:35 am Posts: 5 Has thanked: 0 time Have thanks: 0 time
Thanx a lot for this reply .. was really helpful. I would appreciate if you can temme how I can make this working while the form in the background is getting loaded with some data . I want this form to show the stuff it is showing in front while data gets loaded in back .. !!
rocky18
Question subject: Re: status Progress bar
Posted: Wed Aug 26, 2009 5:18 pm
Joined: Sun Nov 09, 2008 12:35 am Posts: 5 Has thanked: 0 time Have thanks: 0 time
k
rocky18
Question subject: Re: status Progress bar
Posted: Mon Aug 31, 2009 9:08 pm
Joined: Sun Nov 09, 2008 12:35 am Posts: 5 Has thanked: 0 time Have thanks: 0 time
I m still working on how to get it workin .. I wrote code that runs background worker but I m not able to process data using background worker. Can someone help me with that