Visual Studio Development Bookmark and Share   
 index > Visual Studio Source Control and SourceSafe > Programing a progressbar??/ 100% hardcore question
 

Programing a progressbar??/ 100% hardcore question

I am trying to program the progress bar to load in a full bar instead of blocks.
i have change the style to continuous but still it load in blocks.
I am trying to program the progress bar to load according to what value i type in the textbox , i have set its maximum value to be 2000
This is the code i have written... See if the way i program got error which causes it to load in blocks..:

void txtDataReceived_TextChanged(object sender, EventArgs e)

int Counter = Convert.ToInt32(txtDataReceived.Text);

this.progressBar1.Maximum = 2000;

this.progressBar1.Minimum = 0;

this.progressBar1.Value = Convert.ToInt32(Counter);

}

{

private

Heri Tony  Tuesday, September 29, 2009 4:03 AM
Hi Heri,

Your code works fine in my side, you need to add PerformStep() to showprocess.please refer to my code:

        private void textBox1_TextChanged(object sender, EventArgs e)
        {
            int Counter = Convert.ToInt32(this.textBox1.Text);            
            this.progressBar1.Maximum = 2000;
            this.progressBar1.Minimum = 0;
            this.progressBar1.Value = Convert.ToInt32(Counter);
            this.progressBar1.PerformStep();
        }

->See if the way i program got error which causes it to load in blocks..:

What's the error message?


And I would suggest you post your question about Windows Form Control in our Windows Form Forum, you will get better support if you post your question in appropriate forum.

Thanks,
Nancy
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
Nancy Shao  Wednesday, September 30, 2009 11:02 AM
Hi Heri,

Your code works fine in my side, you need to add PerformStep() to showprocess.please refer to my code:

        private void textBox1_TextChanged(object sender, EventArgs e)
        {
            int Counter = Convert.ToInt32(this.textBox1.Text);            
            this.progressBar1.Maximum = 2000;
            this.progressBar1.Minimum = 0;
            this.progressBar1.Value = Convert.ToInt32(Counter);
            this.progressBar1.PerformStep();
        }

->See if the way i program got error which causes it to load in blocks..:

What's the error message?


And I would suggest you post your question about Windows Form Control in our Windows Form Forum, you will get better support if you post your question in appropriate forum.

Thanks,
Nancy
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
Nancy Shao  Wednesday, September 30, 2009 11:02 AM

You can use google to search for other answers

Custom Search

More Threads

• CS 2005 treating some .cs files as "binary"
• Code Required
• There was a failure uloading to url...
• How to synchronize 2 VSS 2005 Servers
• How will I get the application (exe or dll) name using VSSEvents?
• VSS Repository structure and baselines
• Is any new Release of Visual source Safe is in plan?
• Visual SourceSafe 2005 hang with error: Hanging application ssadmin.exe, version 8.0.50727.42
• Visual Source Safe over Internet in old Visual Basic
• Revision and Build not changing in VB.NET project since Source Safe