L
lwslws0208
Unregistered / Unconfirmed
GUEST, unregistred user!
unit Unit3;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls;
type
TForm1 = class(TForm)
procedure FormKeyPress(Sender: TObject;
var Key: Char);
procedure FormPaint(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
const x:integer=1;
y:integer=1;
procedure TForm1.FormKeyPress(Sender: TObject;
var Key: Char);
begin
inc(x,10);
if x>400 then
begin
inc(y,20);
x:=1;
end;
canvas.TextOut(x,y,key);
begin
UserTypedString:=UserTypedString+key;
Invalidate;
end;
end;
procedure TForm1.FormPaint(Sender: TObject);
var rect:trect;
begin
rect.left:=1;
rect.top:=1;
rect.right:=200;
rect.bottom:=30;
canvas.TextRect(rect,0,0,UserTypedString);
end;
end.
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls;
type
TForm1 = class(TForm)
procedure FormKeyPress(Sender: TObject;
var Key: Char);
procedure FormPaint(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
const x:integer=1;
y:integer=1;
procedure TForm1.FormKeyPress(Sender: TObject;
var Key: Char);
begin
inc(x,10);
if x>400 then
begin
inc(y,20);
x:=1;
end;
canvas.TextOut(x,y,key);
begin
UserTypedString:=UserTypedString+key;
Invalidate;
end;
end;
procedure TForm1.FormPaint(Sender: TObject);
var rect:trect;
begin
rect.left:=1;
rect.top:=1;
rect.right:=200;
rect.bottom:=30;
canvas.TextRect(rect,0,0,UserTypedString);
end;
end.