Click to See Complete Forum and Search --> : update progress bar


bobdabilder
July 2nd, 2007, 03:53 PM
I've built a managed c++ app (vs2005) that uses an unmanaged c++ dll. I created one delegate to handle a callback. How will I update my progress bar now that i've done that. Do I have to use the backgroundworker? I ported this app over from vb.net 05 and the code was easy, but now I cannot call the progressbar1->value from my class that i created for the callback. thanks for the help.

bobdabilder
July 3rd, 2007, 10:17 AM
so far in my initialize component() i've done

ProgressBar^ pb = gcnew ProgressBar;


pb->Size = System::Drawing::Size(100,23);
pb->Location = Point(349,495);
pb->Minimum = 0;
pb->Maximum = 100;
pb->Step = 1;
pb->Style = ProgressBarStyle::Blocks;
pb->BackColor = Color::AliceBlue;

this->Controls->Add(pb);

then in my class declaration i do
pb->Value = nStatus;
pb->PerformStep();
pb->Update();
but it the progress bar never moves. any help is appreciated.