Total members 9950 | Gratitudes |It is currently Sat Feb 11, 2012 2:20 am Login / Join Codemiles


All times are UTC [ DST ]




Post new topic Reply to topic  Quick reply  [ 7 posts ] 
Author Question
 Question subject: status Progress bar
PostPosted: Tue Aug 25, 2009 5:58 pm 
Offline
Newbie
User avatar

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


TOP
 Profile Send private message  
Reply with quote  
 Question subject: Re: status Progress bar
PostPosted: Tue Aug 25, 2009 6:51 pm 
Offline
Mastermind
User avatar

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 )


TOP
 Profile Send private message  
Reply with quote  
 Question subject: Re: status Progress bar
PostPosted: Tue Aug 25, 2009 11:13 pm 
Offline
Newbie
User avatar

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


TOP
 Profile Send private message  
Reply with quote  
 Question subject: Re: status Progress bar
PostPosted: Wed Aug 26, 2009 10:18 am 
Offline
Mastermind
User avatar

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 {

        private System.ComponentModel.Container components;
        private System.Windows.Forms.TextBox textBox1;
        private System.Windows.Forms.Label label1;
        private System.Windows.Forms.Button button1;
        private System.Windows.Forms.ProgressBar progressBar1;

        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;
           
            progressBar1.Maximum = 10;
            progressBar1.Location = new System.Drawing.Point(8, 312);
            progressBar1.Minimum = 0;
            progressBar1.TabIndex = 0;
            progressBar1.Value = 0;

           
            progressBar1.Size = new System.Drawing.Size(520, 40);
            progressBar1.Step = 1;
           
            button1.Location = new System.Drawing.Point(152, 168);
            button1.Size = new System.Drawing.Size(144, 48);
            button1.TabIndex = 1;
            button1.Text = "button1";
            button1.Click += new System.EventHandler(button1_Click);
           
            textBox1.Location = new System.Drawing.Point(136, 40);
            textBox1.Text = "0";
            textBox1.TabIndex = 3;
            textBox1.Size = new System.Drawing.Size(184, 20);
            this.Text = "Win32Form2";
            this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
            this.ClientSize = new System.Drawing.Size(616, 393);
            this.Click += new System.EventHandler(Win32Form2_Click);
           
            this.Controls.Add(textBox1);
            this.Controls.Add(label1);
            this.Controls.Add(button1);
            this.Controls.Add(progressBar1);
        }

        protected void button1_Click(object sender, System.EventArgs e) {
       

            if (progressBar1.Value == progressBar1.Maximum){
                progressBar1.Value =  progressBar1.Minimum;
            }
            progressBar1.PerformStep();
            textBox1.Text=progressBar1.Value.ToString() ; // Displays the values of progressbar in textbox
   
        }
        protected void Win32Form2_Click(object sender, System.EventArgs e) {
        }
    }


_________________
Currenlty programming with : java , html , php , and javascript . (OCJP-6 certified )


TOP
 Profile Send private message  
Reply with quote  
 Question subject: Re: status Progress bar
PostPosted: Wed Aug 26, 2009 4:40 pm 
Offline
Newbie
User avatar

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 .. !!


TOP
 Profile Send private message  
Reply with quote  
 Question subject: Re: status Progress bar
PostPosted: Wed Aug 26, 2009 5:18 pm 
Offline
Newbie
User avatar

Joined: Sun Nov 09, 2008 12:35 am
Posts: 5
Has thanked: 0 time
Have thanks: 0 time
k


TOP
 Profile Send private message  
Reply with quote  
 Question subject: Re: status Progress bar
PostPosted: Mon Aug 31, 2009 9:08 pm 
Offline
Newbie
User avatar

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


TOP
 Profile Send private message  
Reply with quote  
Post new topic Reply to topic Quick reply  [ 7 posts ] 
Quick reply


  


 Similar topics
 Topic title   Forum   Author   Comments 
 Progress dialog  GUI  msi_333  0
 Multipart HTTP forms submitter - With Progress Information  Finished Projects  Casper  0
 Print all MySQL status value  PHP Tutorials  msi_333  0
 Typing Status Bar Text javascript code  Scripting Language  msi_333  0
 Status Bar Link Description javascript code  Scripting Language  msi_333  0

All times are UTC [ DST ]


Users browsing similar posts

Users browsing this forum: No registered users and 1 guest



Jump to:  
Previous Question | Next Question 




Home
General Talks
Finished Projects
Code Library
Games
Tutorials

Java
C/C++
C-sharp
php
Script
JSP/Servlets
Ajax
ASP/ASP.net
Google SEO
Database
Communications
Phpbb3 styles
Photoshop tutorials
Flash tutorials
Find a job






Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team