Using TImage

I have on a Form1 an Image. The size, picture, and other proprieties are set as I need.
I created a class that also has as a member a TImage. I want the image in MyObject to be the same as in the Form1.

TImage *Image;

class MyObject{
TImage *Tim;
Extended G, D;
TTimer *Timer_Ex_1;
public:
MyObject {

Tim=Form1->Image;
}
void PozImPeGD(Extended Ga, Extended Da);
};

The way I show is ok when I create one object, but when I create more objects and I show their images, I can see only the last created object

Comments

  • : I have on a Form1 an Image. The size, picture, and other proprieties
    : are set as I need.
    : I created a class that also has as a member a TImage. I want the
    : image in MyObject to be the same as in the Form1.
    :
    : TImage *Image;
    :
    : class MyObject{
    : TImage *Tim;
    : Extended G, D;
    : TTimer *Timer_Ex_1;
    : public:
    : MyObject {
    :
    : Tim=Form1->Image;
    : }
    : void PozImPeGD(Extended Ga, Extended Da);
    : };
    :
    : The way I show is ok when I create one object, but when I create
    : more objects and I show their images, I can see only the last
    : created object
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion