![]() |
| ||
|
|
Новости |
Поиск |
FAQ |
Статьи |
Книги |
Новости VCL
| | Форумы ЧАТ |
Орешник |
|
| |||
| |||
« предыдущая ветвь | форум | следующая ветвь »
TImage [D2005, XP]
Wel © (2006-02-21 23:31:00)Уважаемые мастера. Для того чтобы последовательно загрузить jpg в Image. я использовал следующий код, но с каждым добавлением Image и код соответственно увеличивается. Подскажите пожалуйста как можно иначе прописать. Если не затруднит то отпишите кусочек кода .
procedure TForm1.FileListBox1DblClick(Sender: TObject);
var f: integer; FS:TFilestream;
begin
FS := TFileStream.Create(FileListBox1.Filename, fmOpenRead or fmShareDenyWrite);
f := FS.Size; f := f div 1024;
if Image1.picture.graphic = nil then Label1.Caption := IntToStr(f) +' Kb' else
if Image2.picture.graphic = nil then Label2.Caption := IntToStr(f) +' Kb' else
if Image3.picture..........
if Image15.picture.graphic = nil then Label15.Caption := IntToStr(f) +' Kb' ;
if Image1.Picture.Graphic= nil then Image1.Picture.Assign(ViewImage.Picture) else
if Image2.Picture.Graphic= nil then Image2.Picture.Assign(ViewImage.Picture) else
if Image3.Picture........
if Image15.Picture.Graphic= nil then Image15.Picture.Assign(ViewImage.Picture);
McSimm (2006-02-21 23:41:00) [1]for i:=0 to ComponentCount-1 do
if (Components[i] is TImage) then
begin
......
end