广州高深商电子技术有限公司 用户登录
用户注册 ......
首页 公告 收款机 抽奖机 来电管理 数据采集 台球灯控 软件开发 综合 会员下载 发货查询
公司首页
当前位置:首页>> 来电管理>> 二次开发 >>正文
使用Socket服务进行“来电显示”二次开发
chen在2006/6/11发表,被浏览7498
编程方式:delphi

查询和获取来电信息的Socket的指令见“服务程序”一文。

建立窗体如下:



程序代码如下:
unit cltTeleSS;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ScktComp;

type
  TForm1 = class(TForm)
    edCmd: TEdit;
    Button1: TButton;
    ClientSocket1: TClientSocket;
    Memo1: TMemo;
    edIP: TEdit;
    Button2: TButton;
    edPort: TEdit;
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    procedure Button1Click(Sender: TObject);
    procedure ClientSocket1Read(Sender: TObject; Socket: TCustomWinSocket);
    procedure FormShow(Sender: TObject);
    procedure Button2Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.FormShow(Sender: TObject);
begin
  //ClientSocket1.Active:=True;
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
  ClientSocket1.Socket.SendText(edCmd.Text);
end;

procedure TForm1.ClientSocket1Read(Sender: TObject;
  Socket: TCustomWinSocket);
begin
  Memo1.Lines.Add(Socket.ReceiveText);
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
  with ClientSocket1 do begin
    if Active then Close;
    Address:=edIP.Text;
    Port:=StrToInt(edPort.Text);
    Active:=True;
  end;
end;

end.
【相关文章】
使用Socket服务进行“…
【同类文章】
高深商GSM无线固话盒OC…
WIFI接口来电显示管理器…
新一代USB转COM口来电…
来电管理器故障排除的方法
在WIN7或Win8中注册…
计算机收发短信的OCX控件…
使用Java开发来电显示管…
开发来电显示及录音程序的C…
C#来电显示管理器开发示例…
使用C#的Socket开发…

广州高深商电子技术有限公司

地址:天河北路908号、高科大厦B座2704
电话:020-38259081、38258857
电子邮箱:gaoykosen@foxmail.com