I would like to create a function which replaces the current image with another one. The problem is that I have 64 pictures to replace. I created a function with a TImage* Sender
parameter but it works only when I set Sender
as TObject*
instead.
How can I change this function:
void __fastcall TForm1::Image1Click(TObject *Sender)
{
Sender->Picture->LoadFromFile("puste.bmp");
}
into this
void __fastcall TForm1::Image1Click(TImage *Sender)
{
Sender->Picture->LoadFromFile("puste.bmp");
}
I am using the VCL library.