
02.09.2007, 18:28
|
Прохожий
|
|
Регистрация: 02.09.2007
Сообщения: 38
Репутация: 10
|
|
Подскажите что неправильно в коде
Вроде бы все правильно, все скатал из учебника, но почему то место синего неба и летящего самолета пустота.... В чем ошибка? Рисунки пихнул в папку с сохраненным проектом!
Код:
unit Unit2;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs;
type
TForm2 = class(TForm)
procedure FormPaint(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form2: TForm2;
sky, aplane: TBitMap;
implementation
{$R *.dfm}
procedure TForm2.FormPaint(Sender: TObject);
begin
sky:=TBItMap.create;
aplane:=TBitMap.create;
sky.LoadFromFile('sky.bmp');
aplane.LoadFromFile('aplane.bmp');
Form2.Canvas.Draw(0,0,sky);
Form2.Canvas.Draw(20,20,aplane);
aplane.Transparent:=True;
end;
end.
|