create dynamically a progress bar in c++ builder

hELLO Every human body.Joking.
I am trying to create a progress bar dynamically.Below is the code:

TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
        : TForm(Owner)
{
 TProgressBar *pr2;
 pr2=new TProgressBar(Form1);
 pr2->Enabled=true;
 pr2->Min=0;
 pr2->Max=100;
 pr2->Width=100;
 pr2->Height=200;
 pr2->Top=200;
 pr2->Left=200;
 pr2->Show();
}
but the progress bar won't be shown.What to do?
Thanks.
Sotiris.
sotiris_zegiannisAsked:
Who is Participating?
 
cwwkieCommented:
Is there something else on the form? You should set the parent propery of pr2.
0
 
sotiris_zegiannisAuthor Commented:
Thanks A lot.Take care.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.