文件名称:来电显示的Delphi开发控件
文件大小:328KB
文件格式:ZIP
更新时间:2010-03-26 12:15:43
CPort Delphi TeleComport 开发控件 来电显示
开发来电显示的Delphi控件包: 使用方法: (1) 下载控件包Component.zip (2) 先编译 CPortLib6.dpk ,已安装了CPortLib 控件组的可省略这一步骤 (3) 然后编译 TelePort.dpk ,并安装 (4) 安装完成后,在 kosenTools 控件页增加了一个控件:TeleComport (5) 使用示例请看 Project2.dpr
示例源程序: unit Unit2; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, CPort, TeleComportUnit;
type TForm1 = class(TForm) TeleComport1: TTeleComport; Memo1: TMemo; Button1: TButton; Button2: TButton; Button3: TButton; Button4: TButton; Button5: TButton; procedure Button2Click(Sender: TObject); procedure Button1Click(Sender: TObject); procedure Button3Click(Sender: TObject); procedure TeleComport1Open(Sender: TObject); procedure TeleComport1Close(Sender: TObject); procedure TeleComport1Read(Sender: TObject; s: String; t: TDateTime); procedure Button4Click(Sender: TObject); procedure Button5Click(Sender: TObject); private { Private declarations } public { Public declarations } end;
var Form1: TForm1;
implementation {$R *.dfm}
procedure TForm1.Button2Click(Sender: TObject); begin if TeleComport1.SetupPort then Memo1.Lines.Add(\'Port=\'+TeleComport1.Port); //设置来电管理器的连接端口,USB端口的设置为Port:=\"USB\" end; procedure TForm1.Button1Click(Sender: TObject); begin TeleComport1.Open; end; procedure TForm1.Button3Click(Sender: TObject); begin TeleComport1.Close; end; procedure TForm1.TeleComport1Open(Sender: TObject); begin if TeleComport1.JDConnected then begin Memo1.Lines.Add(\'Connected\'); //打开端口时读取来电管理器内缓存的号码 TeleComport1.ReadAllWhenOpen; end; end; procedure TForm1.TeleComport1Close(Sender: TObject); begin if not TeleComport1.JDConnected then Memo1.Lines.Add(\'not Connected\'); end; //有来电时触发此事件 //s为来电号码,t为来电时间 procedure TForm1.TeleComport1Read(Sender: TObject; s: String; t: TDateTime); begin Memo1.Lines.Add(s+FormatDateTime(\' yyyy-mm-dd hh:nn:ss\', t)); end; procedure TForm1.Button4Click(Sender: TObject); begin Memo1.Lines.Add(\'RecordsCount=\'+IntToStr(TeleComport1.RecordsCount)); //未读来电次数 end; procedure TForm1.Button5Click(Sender: TObject); begin TeleComport1.ReadAllRecords; //读取所有缓存内的来电 end; end.
【文件预览】:
Component
----安装说明.txt(327B)
----CPort()
--------CPortLib6.cfg(390B)
--------CPort.inc(1KB)
--------CPortSetup.dfm(2KB)
--------CPortEsc.pas(12KB)
--------CPortLib6.dpk(776B)
--------CPortTrmSet.dfm(2KB)
--------CPort.pas(100KB)
--------gnugettext.pas(62KB)
--------CPortImg.res(7KB)
--------CPortSetup.pas(2KB)
--------CPortLib6.res(2KB)
--------CPortCtl.pas(71KB)
--------CPortTrmSet.pas(3KB)
----USBunit.pas(3KB)
----Project2.res(876B)
----TelePort.res(2KB)
----TeleComportUnit.pas(17KB)
----CH375DLL.DLL(15KB)
----TelePort.dpk(687B)
----Project2.exe(488KB)
----TelePortSet.dfm(2KB)
----CH375DLL.PAS(12KB)
----Project2.dpr(188B)
----TelePort.cfg(390B)
----Unit2.dfm(2KB)
----TelePortSet.pas(2KB)
----Unit2.pas(2KB)