I'm trying to write a program which would be able to show bitmaps in a vertical line, one at the bottom of the other.
Does anyone know the way I could solve this problem?
I have this algorithm, but I have no idea how to modify it for this purpose:
- Code: Select all
unit Unit1;
interface
uses
Windows, SysUtils, Classes, Graphics, Forms;
type
TForm1 = class(TForm)
procedure FormCreate(Sender: TObject);
procedure FormPaint(Sender: TObject);
procedure FormDestroy(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
backgroundImage : TBitmap;
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.FormCreate(Sender: TObject);
begin
backgroundImage := TBitmap.Create;
backgroundImage.LoadFromFile(ExtractFilePath(Application.ExeName)+'background.bmp');
end;
procedure TForm1.FormPaint(Sender: TObject);
begin
Canvas.Draw( 0, 0, backgroundImage );
end;
procedure TForm1.FormDestroy(Sender: TObject);
begin
backgroundImage.Free;
end;
end.
THANK YOU!