![]() |
| ||
|
|
Новости |
Поиск |
FAQ |
Статьи |
Книги |
Новости VCL
| | Форумы ЧАТ |
Орешник |
|
| |||
| |||
« предыдущая ветвь | форум | следующая ветвь »
Смена картинок по таймеру [D7, WinME]
clampo © (2004-08-28 23:19:00)Привет всем!!! Как сделать так что бы н\р 5 картинок менялись одна за другой,
и это снова повторялось и без могания и торможения
dRake (2004-08-29 02:00:00) [1]Блин забыл :)
procedure FormDestroy;
var i : integer;
begin
for i := 1 to 5 do TBMP[i].Free;
end;
dRake (2004-08-29 01:57:00) [2]VAR
ABMP : array [1..5] of TBitmap;
Index : integer;
{...}
Procedure FormCreate;
var i : integer;
s : string;
begin;
for i := 1 to 5 do
begin;
TBMP[i] := TBitmap.Create;
case i of
1: s := 'Image1.bmp';
2: s := 'Image2.bmp';
{...}
end;
TBMP[i].LoadFromFile(s);
end;
Index := 1;
end;
{...}
procedure Timer1OnTimer;
begin;
inc(Index);
if Index > 5 then Index := 1;
BitBlt(Form1.Canvas.Handle, 10, 10, TBMP[Index].Width,
TBMP[Index].Height, TBMP[Index].Canvas.Handle, 0, 0,
SRCCOPY);
end;