Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
CheckUn.pas
Package: PhotoCut.zip [view]
Upload User: sqdhmy
Upload Date: 2022-05-16
Package Size: 2930k
Code Size: 2k
Category:
Graph program
Development Platform:
Delphi
- unit CheckUn;
- interface
- uses
- Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
- Dialogs, ExtCtrls, StdCtrls, printers;
- type
- TCheDelF = class(TForm)
- Memo1: TMemo;
- bvl1: TBevel;
- btnprn: TButton;
- btnsav: TButton;
- btnclo: TButton;
- dlgSave1: TSaveDialog;
- dlgPnt1: TPrintDialog;
- procedure btnprnClick(Sender: TObject);
- procedure btncloClick(Sender: TObject);
- procedure btnsavClick(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
- var
- CheDelF: TCheDelF;
- implementation
- uses UnitPcut;
- {$R *.dfm}
- procedure TCheDelF.btnprnClick(Sender: TObject);
- var
- lines:integer;
- prntext:system.text;
- //将PRNTEXT声明为一个在SYSTEM程序单元当中定义的文本文件
- begin
- if dlgPnt1.execute then
- begin
- assignprn(prntext); //将PRNTEST分配给打印机
- rewrite(prntext); //调用REWRITE函数,为输出打开已分配的文件
- printer.canvas.font:=memo1.font; //把当前MEMO1的字体指定给打印对象的CANVAS的字体属性
- for lines:=0 to memo1.lines.count-1 do
- writeln(prntext,memo1.lines[lines]); //把MEMO的内容写到打印机对象
- system.close(prntext); //关闭打印文件
- end;
- end;
- procedure TCheDelF.btncloClick(Sender: TObject);
- begin
- Close;
- end;
- procedure TCheDelF.btnsavClick(Sender: TObject);
- begin
- dlgSave1.Filter:='文本文件(*.txt)|*.TXT';
- dlgSave1.DefaultExt:='txt';
- if dlgSave1.Execute then
- Memo1.Lines.SaveToFile(dlgSave1.FileName)
- end;
- end.