征 类似QQ的聊天工具(100分)

  • 主题发起人 主题发起人 SuperBBS
  • 开始时间 开始时间
S

SuperBBS

Unregistered / Unconfirmed
GUEST, unregistred user!
公司可能要启动一个类似QQ的聊天工具,有相关产品的可以合作。
要求:
1. 有现成的产品
2. 能实现互连网文字、语音聊天.
3. 服务器端支持数据库保存信息
4. 服务器、客户端均采用Delphi开发
5. 需要提供原码
6. 最好基于Jabber 和 Exodus 改造

有相关产品的可以留下联系方式和适用下载地址.
 
我有,77863373
 
CHAT,QQ,ICQ下载地址:
--------------
http://sourceforge.net/softwaremap/trove_list.php?form_cat=22
 
问题: 我的所有分都奉上,求(功能:类似QQ聊天)远程通讯的控件是什么?还有各位有什么建议? ( 积分: 85 )
分类: 控件 - 使用

来自: 南腔北调, 时间: 2003-08-03 15:13:00, ID: 2080641
就是想做一个聊天工具,基本功能跟QQ差不多,但目的不同,是要与公司现有系统整合,方便公司上对下的一个了解通道

现在是局域网的,我采用的是TClientSocket与TServerSocket(TCP)
想改成广域网的

来自: takashiki, 时间: 2003-08-03 15:33:00, ID: 2080673
INDY呀。
TIdUDPClient与TIdUDPServer
因为INDY天生就支持线程

来自: zhangshunzhong, 时间: 2003-08-03 16:30:00, ID: 2080755
TNMUDP:
下面是一个例程,包括三个文件Project1.dpr,unit1.pas,unit1.dfm

{Project1.dpr}
program Project1;
uses
Forms,
Unit1 in 'Unit1.pas' {Form1};
{$R *.RES}
begin
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.Run;
end.



{unit1.dfm}
object Form1: TForm1
Left = 319
Top = 118
Width = 522
Height = 477
Caption = 'Form1'
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
OnShow = FormShow
PixelsPerInch = 96
TextHeight = 13
object Panel1: TPanel
Left = 0
Top = 400
Width = 514
Height = 53
Align = alBottom
BevelInner = bvLowered
BevelOuter = bvNone
TabOrder = 0
object Label1: TLabel
Left = 7
Top = 20
Width = 48
Height = 16
Caption = '内容:'
Font.Charset = ANSI_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = '宋体'
Font.Style = []
ParentFont = False
end
object Edit1: TEdit
Left = 57
Top = 16
Width = 324
Height = 24
Font.Charset = ANSI_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = '宋体'
Font.Style = []
ParentFont = False
TabOrder = 0
OnKeyPress = Edit1KeyPress
end
object BitBtn1: TBitBtn
Left = 416
Top = 14
Width = 80
Height = 25
Caption = '发送'
Font.Charset = ANSI_CHARSET
Font.Color = clWindowText
Font.Height = -15
Font.Name = '宋体'
Font.Style = []
ParentFont = False
TabOrder = 1
OnClick = BitBtn1Click
end
end
object Panel2: TPanel
Left = 0
Top = 0
Width = 514
Height = 400
Align = alClient
TabOrder = 1
object Memo1: TMemo
Left = 1
Top = 1
Width = 376
Height = 398
Align = alLeft
Lines.Strings = (
'')
ScrollBars = ssBoth
TabOrder = 0
end
object ListBox1: TListBox
Left = 376
Top = 1
Width = 137
Height = 335
ItemHeight = 13
TabOrder = 1
end
object Button1: TButton
Left = 415
Top = 338
Width = 80
Height = 25
Caption = '增加'
Font.Charset = ANSI_CHARSET
Font.Color = clWindowText
Font.Height = -15
Font.Name = '宋体'
Font.Style = []
ParentFont = False
TabOrder = 2
OnClick = Button1Click
end
object Button2: TButton
Left = 415
Top = 370
Width = 80
Height = 25
Caption = '删除'
Font.Charset = ANSI_CHARSET
Font.Color = clWindowText
Font.Height = -15
Font.Name = '宋体'
Font.Style = []
ParentFont = False
TabOrder = 3
OnClick = Button2Click
end
end
object NMUDP1: TNMUDP
RemotePort = 8888
LocalPort = 8888
ReportLevel = 1
OnDataReceived = NMUDP1DataReceived
Left = 296
Top = 80
end
end



{unit1.pas}
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, Buttons, NMUDP, ExtCtrls;

type
TForm1 = class(TForm)
Panel1: TPanel;
Panel2: TPanel;
Memo1: TMemo;
ListBox1: TListBox;
Button1: TButton;
Button2: TButton;
NMUDP1: TNMUDP;
Edit1: TEdit;
BitBtn1: TBitBtn;
Label1: TLabel;
procedure FormShow(Sender: TObject);
procedure BitBtn1Click(Sender: TObject);
procedure NMUDP1DataReceived(Sender: TComponent; NumberBytes: Integer;
FromIP: String; Port: Integer);
procedure Edit1KeyPress(Sender: TObject; var Key: Char);
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;
ComputerName: array[0..127] of Char;

implementation

{$R *.DFM}

procedure TForm1.FormShow(Sender: TObject);
var
sz: dword;
begin
sz := SizeOf(Computername);
GetComputerName(ComputerName,sz);//得到本机的标识
ListBox1.Items.Clear;
ListBox1.Items.Add('大家');//在网友清单中,增加"大家"和
ListBox1.Items.Add(ComputerName);//本机名称
ListBox1.ItemIndex:=0;
end;

procedure TForm1.BitBtn1Click(Sender: TObject);
var
MyStream: TMemoryStream;
TmpStr: String;
i:integer;
begin
if Edit1.Text<>'' then //file://如果所说的内容不为空则发送。
begin
NMUDP1.ReportLevel := Status_Basic;
NMUDP1.RemotePort :=8888;//端口为:8888,可以自己定义,但必须与LocalPort相一致。
if ListBox1.Items[ListBox1.ItemIndex]=ComputerName then
Edit1.Text:=ComputerName+'自言自语道:'+Edit1.Text //file://如果和自己对话.
Else
Edit1.Text:=ComputerName+'对'+ListBox1.Items[listbox1.itemindex]+'说:'+Edit1.Text;
TmpStr :=Edit1.text;
MyStream := TMemoryStream.Create;
try
MyStream.Write(TmpStr[1],Length(Edit1.Text));
if ListBox1.ItemIndex=0 then
begin
for i:=1 to ListBox1.Items.Count-1 do //file://如果选择&quot;大家&quot;,则对所有的网友发送信息
begin
NMUDP1.RemoteHost :=ListBox1.Items;//远程主机的名称或地址.
NMUDP1.SendStream(MyStream);//发送信息.
End;
end
else //如果私聊
begin
NMUDP1.RemoteHost :=ListBox1.Items[ListBox1.itemindex]; //file://仅对所选中的网友.
NMUDP1.SendStream(MyStream);
End;
finally
MyStream.Free;
end;
Edit1.Text:='';
Edit1.SetFocus;
end
else
Edit1.SetFocus;
end;

procedure TForm1.NMUDP1DataReceived(Sender: TComponent;
NumberBytes: Integer; FromIP: String; Port: Integer);
var
MyStream: TMemoryStream;
TmpStr: String;
begin
MyStream := TMemoryStream.Create;
try
NMUDP1.ReadStream(MyStream);
SetLength(TmpStr,NumberBytes);
MyStream.Read(TmpStr[1],NumberBytes);
Memo1.Lines.Add(TmpStr); //file://显示对话的内容.
finally
MyStream.Free;
end;
end;

procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: Char);
var
MyStream: TMemoryStream;
TmpStr: String;
i:integer;
begin
if (key=#13) and (Edit1.Text<>'') then //file://如果所说的内容不为空,且最后一个按键为&quot;Enter&quot;则发送。
begin
NMUDP1.ReportLevel := Status_Basic;
NMUDP1.RemotePort :=8888;
if ListBox1.Items[ListBox1.ItemIndex]=ComputerName then
Edit1.Text:=ComputerName+'自言自语道:'+Edit1.Text
else
Edit1.Text:=ComputerName+'对'+ListBox1.Items[listbox1.itemindex]+'说:'+Edit1.Text;
TmpStr :=Edit1.text;
MyStream := TMemoryStream.Create;
try
MyStream.Write(TmpStr[1],Length(Edit1.Text));
if ListBox1.ItemIndex=0 then
begin
for i:=1 to ListBox1.Items.Count-1 do
begin
NMUDP1.RemoteHost :=ListBox1.Items;
NMUDP1.SendStream(MyStream);
end;
end
else
begin
NMUDP1.RemoteHost :=ListBox1.Items[ListBox1.itemindex];
NMUDP1.SendStream(MyStream);
end;
finally
MyStream.Free;
end;
Edit1.Text:='';
edit1.SetFocus;
end
else
Edit1.SetFocus;
end;

procedure TForm1.Button1Click(Sender: TObject);
var
InputString:String;
begin
InputString:=InputBox('增加人员','IP地址或计算机名','');
if Inputstring<>'' then ListBox1.Items.Add(Inputstring);
ListBox1.ItemIndex:=0;
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
if ListBox1.ItemIndex<>0 then ListBox1.Items.Delete(ListBox1.ItemIndex);
end;

end.



来自: yangh888, 时间: 2003-08-10 8:29:00, ID: 2097907
可以传送文件吗?

来自: zhangshunzhong, 时间: 2003-08-10 11:04:00, ID: 2098041
传的就是文件,把Project1.dpr,unit1.pas,unit1.dfm三部分内容
粘贴到文本文件中,然后把文件名改成上述三个文件,打开Project1.dpr
就可以了



来自: 南腔北调, 时间: 2003-08-22 23:17:00, ID: 2128485
谢了

得分大富翁: takashiki-20,yangh888-10,zhangshunzhong-55,
 
我们公司开发的就是这种软件
可以和我们联系一下
www.onlineoa.com
 
另外,在www.2ccc.com的快速搜索里输入“聊天”,即可看到很多类似于QQ的代码。
 
和QQ抗衡吗?
 
多谢大家的参与,有钱大家一起赚。
 
谈了几个供应商都失败了。转到 sxsoft 挂牌招标。
 
现在办事太难了。
有钱大家都不想赚。
 

Similar threads

后退
顶部