1. Заведите приватный массив:
Код:
Jpg: Array[0..1] of TJpegImage;
2. При создании формы заполните его:
Код:
Jpg[0] := TJpegImage.Create;
Jpg[0].LoadFromFile('1.JPG');
Jpg[1] := TJpegImage.Create;
Jpg[1].LoadFromFile('2.JPG');
3. В событии таймера делайте присвоение так:
Код:
if not pig1 and not pig2 and not pig3 and not pig4 and not pig5 and not pig6 and not pig7
then begin
image1.Picture.Assign(Jpg[0]);
pig1 := true;
end
else if pig1 and not pig2 and not pig3 and not pig4 and not pig5 and not pig6 and not pig7
then begin
image1.Picture.Assign(Jpg[1]);
pig1 := false;
pig2 := true;
end;
4. Для формы включите DoubleBufered