trichview.com

trichview.support




Re: How to insert gif


Return to index


Author

Message

Allen

Posted: 02/12/2003 11:19:42


Thanks Yenar,

BTW is the method the same when using Anders Melander TGifImage. Is the method

same as that of RX.


Thanks.


"Yernar" <[email protected]> wrote:

>I use Delphi 5 (Update Pack 1) and Rx library:

>

>unit main;

>

>interface

>

>uses

>  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,

>  RVStyle, RVScroll, RichView, RxGIF;

>

>type

>  TGifForm = class(TForm)

>    GifRichView: TRichView;

>    GifRVStyle: TRVStyle;

>    procedure FormCreate(Sender: TObject);

>  private

>  public

>  end;

>

>var

>  GifForm: TGifForm;

>

>implementation

>

>{$R *.DFM}

>

>procedure TGifForm.FormCreate(Sender: TObject);

>var

>  gif: TGifImage;

>begin

>  gif := TGifImage.Create;

>  gif.LoadFromFile('keden.gif');

>  GifRichView.AddPictureEx('Gif', gif, 1, rvvaBaseLine);

>  GifRichView.Format;

>end;

>

>end.

>

>

>

>Sergey says that if your version of Delphi is lower than 6 (without Update

>Packs) it should look like this:

>

>unit main;

>

>interface

>

>uses

>  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,

>  RVStyle, RVScroll, RichView, RxGIF, RVFuncs;

>

>type

>  TGifForm = class(TForm)

>    GifRichView: TRichView;

>    GifRVStyle: TRVStyle;

>    procedure FormCreate(Sender: TObject);

>  private

>  public

>  end;

>

>var

>  GifForm: TGifForm;

>

>implementation

>

>{$R *.DFM}

>

>function CreateGraphics(GraphicClass: TGraphicClass): TGraphic;

>begin

>  if GraphicClass = TGifImage then

>    Result := TGifImage.Create

>  else

>    Result := GraphicClass.Create;

>end;

>

>procedure TGifForm.FormCreate(Sender: TObject);

>var

>  gif: TGifImage;

>begin

>  RV_CreateGraphics := CreateGraphics;

>  gif := TGifImage.Create;

>  gif.LoadFromFile('keden.gif');

>  GifRichView.AddPictureEx('Gif', gif, 1, rvvaBaseLine);

>  GifRichView.Format;

>end;

>

>initialization

>  TPicture.RegisterFileFormat('gif', 'Gif Image', TGifImage);

>

>end.

>

>

>





Powered by ABC Amber Outlook Express Converter