Link to home
Start Free TrialLog in
Avatar of nosleep
nosleep

asked on

How to swap to images?

Hi

Problem: How to swap images ?

Info: 1 form  with  3 Image components and 1 BitButton
      Procedure bellow swaps images and works OK
 
procedure TForm1.BitBtn1Click(Sender: TObject);
begin
  Image3.Picture.Bitmap := Image1.Picture.Bitmap;
  Image1.Picture.Bitmap := Image2.Picture.Bitmap;
  Image2.Picture.Bitmap := Image3.Picture.Bitmap;
end;

To Do: i need procedure which will be like this one bellow,
       btw: procedure is not working  
 
procedure TForm1.BitBtn1Click(Sender: TObject);
var
   imgTemp: TBitmap;
begin
  imgTemp := Image1.Picture.Bitmap;
  Image1.Picture.Bitmap := Image2.Picture.Bitmap;
  Image2.Picture.Bitmap := imgTemp;
end;


Please, can anyone help me !
ASKER CERTIFIED SOLUTION
Avatar of kretzschmar
kretzschmar
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
hu, 10 points :-(
not seen before
Avatar of nosleep
nosleep

ASKER

OK, 77 points  for kretzchmar if good comment
well, thats ok,
if my comment solves your problem,
then don't forget the grading

watch out for the button "accept answer" or similar
on the upper right of each comment

meikl ;-)