Показать сообщение отдельно
  #7  
Старый 03.04.2011, 04:17
Аватар для ryderx34
ryderx34 ryderx34 вне форума
Активный
 
Регистрация: 22.01.2010
Сообщения: 211
Версия Delphi: 7, 2010
Репутация: 1349
По умолчанию

Показывает картинку в отдельном окне:
Код:
procedure ViewImage(const FileName: string);
var
  ImgForm: TForm;
begin
  ImgForm := TForm.Create(nil);
  with ImgForm do
  try
    BorderIcons := [biSystemMenu];
    BorderStyle := bsSingle;
    Caption := ExtractFileName(FileName);
    ClientHeight := 240;
    ClientWidth := 320;
    Position := poDesktopCenter;
    with TImage.Create(ImgForm) do
    begin
      Parent := ImgForm;
      Align := alClient;
      Picture.LoadFromFile(FileName);
      Stretch := True;
    end;
    ShowModal;
  finally
    Free;
  end;
end;
Ответить с цитированием