UnitTxt.~pas
上传用户:conquerdj
上传日期:2022-07-08
资源大小:417k
文件大小:1k
- unit UnitTxt;
- interface
- uses
- Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
- Dialogs, StdCtrls;
- type
- TFormTxt = class(TForm)
- Edit1: TEdit;
- procedure Edit1KeyUp(Sender: TObject; var Key: Word;
- Shift: TShiftState);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
- var
- FormTxt: TFormTxt;
- implementation
- uses UnitFormCanvas,UnitPaintbrush;
- {$R *.dfm}
- procedure TFormTxt.Edit1KeyUp(Sender: TObject; var Key: Word;
- Shift: TShiftState);
- begin
- //将Edit1的内容拷贝到 image1上
- FormCanvas.image1.Canvas.TextOut(FormTxt.Left+1,FormTxt.Top+1,FormTxt.Edit1.Text);
- end;
- end.