type TForm1 = class(TForm) Image1: TImage; Button1: TButton; OpenDialog1: TOpenDialog; procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end;
var Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject); begin if OpenDialog1.Execute then begin Image1.Picture.LoadFromFile(OpenDialog1.FileName); Image1.Stretch:=true; Image1.Left:=form1.Width div 2-image1.Width div 2; Image1.top:=form1.Height div 2-image1.Height div 2; end end;
ToPoint(1,3);
PenDown;
ToPoint(2,4);
ToPoint(1,5);
ToPoint(3,3);
ToPoint(2,4);
ToPoint(2,5);
ToPoint(2,3);
ToPoint(2,4);
ToPoint(3,5);
PenUp;
ToPoint(5,5);
PenDown;
ToPoint(4,5);
ToPoint(4,4);
ToPoint(5,4);
ToPoint(4,4);
ToPoint(4,3);
ToPoint(5,3);
PenUp;
ToPoint(6,5);
PenDown;
ToPoint(6,3);
ToPoint(6,4);
ToPoint(7,4);
ToPoint(7,5);
ToPoint(7,3);
PenUp;
ToPoint(8,3);
PenDown;
ToPoint(9,4);
ToPoint(9,3);
ToPoint(9,5);
ToPoint(8,5);
ToPoint(8,4);
ToPoint(9,4);
PenUp;
end.
если ошибка в какой то букве говорите
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls;
type
TForm1 = class(TForm)
Image1: TImage;
Button1: TButton;
OpenDialog1: TOpenDialog;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
if OpenDialog1.Execute then
begin
Image1.Picture.LoadFromFile(OpenDialog1.FileName);
Image1.Stretch:=true;
Image1.Left:=form1.Width div 2-image1.Width div 2;
Image1.top:=form1.Height div 2-image1.Height div 2;
end
end;
end.