saimaz 0 Newbie Poster

greetings everyone,

i try to use ProgressBar from other class, i think the solve would be to create TForm1 object. But i dont know how to do it.

void Array_class::mix(int a)
{
 int b,c,d;
 //Memo1->Lines->Add("Array is now mixing....");
TForm1 obj;
 obj.ProgressBar1->Position = 0;
 obj.ProgressBar1->Max = (a);
 for(int i=0;i<a;i++)
   {
    b = random(a);
    d = random(a);
    c = masyvas[b];
    masyvas[b] = masyvas[d];
    masyvas[d] = c;
    obj.ProgressBar1->StepBy(1);
   }

  //Memo1->Lines->Add("Array mixed.");
}

where is my mistake? thanks for the support.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.