社区
网络及通讯开发
帖子详情
不知大家有没有遇到以下NMUDP控件的问题:不能关机...
fang007
2003-10-18 08:17:15
我发现在程序中使用了NMUDP控件后,只要程序不关闭,Windows就关不掉,Windows2000有时能有时不能,Windows98就直接关不掉,好象NM系列控件都有这个问题!
...全文
45
11
打赏
收藏
不知大家有没有遇到以下NMUDP控件的问题:不能关机...
我发现在程序中使用了NMUDP控件后,只要程序不关闭,Windows就关不掉,Windows2000有时能有时不能,Windows98就直接关不掉,好象NM系列控件都有这个问题!
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
11 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
pp616
2003-11-02
打赏
举报
回复
我没遇到不能关系。我用nmudp有的时候很好。有的时候直接死机。
95533
2003-11-02
打赏
举报
回复
在CloseQuery()事件里执行
delete NMUDP1; 或 NMUDP1->Free();
MartinWang
2003-11-02
打赏
举报
回复
是他的bug,nmstrm也都是这个毛病,主要是由于在关闭程序时,他接收到wm_close(是这个吧,可能写错了)而他没有处理!!:)
xiaolong83
2003-11-02
打赏
举报
回复
我也遇见过。
holerescue
2003-11-02
打赏
举报
回复
我劝你以后不要用FastNet了,这套控件问题很大,就是由于这个原因Delphi7把它去掉了.你可以用ServerSock,ClientSocke或是indy,它们都很好
ddsft
2003-11-02
打赏
举报
回复
To: fang007 (天圆地方)
我碰到了和你同样的问题:逐怀疑其是否的确有此BUG!!
猛禽
2003-10-21
打赏
举报
回复
FastNet的BUG
改用INDY吧
ysyzqm-zqm
2003-10-20
打赏
举报
回复
对不起,让大家笑话了,应该是:
NMUDP->Free()
ysyzqm-zqm
2003-10-20
打赏
举报
回复
不能关闭的原因是NM控件在你的程序关闭前必须手动关闭
NMUDP->Close()
iYoung
2003-10-19
打赏
举报
回复
不能关闭程序是 NM 控件的 bug。解决方法帖主可以先搜索一下 NMUDP。
fang007
2003-10-18
打赏
举报
回复
忘了还有一个问题是,NMUDP控件每次发送数据时不能发送大于2048字节的数据,否则接收端(也用NMUDP控件)就抛出异常,程序中断!
delphi
NM
UDP
控件
可以用delphi2007的版本,找了好几个,都
不能
在delphi 2007上使用,现在找到了,跟大家分享一下。
DELPHI网络聊天
unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, ExtCtrls,
NM
UDP
, Buttons, Menus, ComCtrls,WinSock; type TForm1 = class(TForm) Panel1: TPanel; Edit1: TEdit; Label1: TLabel;
NM
UDP
1: T
NM
UDP
; BitBtn1: TBitBtn; Panel2: TPanel; Label2: TLabel; Label3: TLabel; Button1: TButton; Button2: TButton; GroupBox1: TGroupBox; ListBox1: TListBox; GroupBox2: TGroupBox; Memo1: TMemo; procedure BitBtn1Click(Sender: TObject); procedure
NM
UDP
1DataReceived(Sender: TComponent; NumberBytes: Integer;FromIP: String; Port: Integer); procedure Edit1KeyPress(Sender: TObject; var Key: Char); procedure Button1Click(Sender: TObject); procedure Button2Click(Sender: TObject); procedure FormCreate(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; ComputerName: array[0..127] of Char; implementation {$R *.dfm} procedure TForm1.BitBtn1Click(Sender: TObject); var MyStream: TMemoryStream; TmpStr: String; i:integer; Begin if Edit1.Text<>'' then //如果所说的内容不为空,则发送。 begin
NM
UDP
1.ReportLevel := Status_Basic;
NM
UDP
1.RemotePort :=8888;//端口为:8888,可以自己定义,但必须与LocalPort相一致。 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
NM
UDP
1.RemoteHost :=ListBox1.Items[i];//远程主机的名称或地址.
NM
UDP
1.SendStream(MyStream);//发送信息. End; end else begin
NM
UDP
1.RemoteHost :=ListBox1.Items[ListBox1.itemindex]; //仅对所选中的网友.
NM
UDP
1.SendStream(MyStream); End; finally MyStream.Free; end; Edit1.Text:=''; Edit1.SetFocus; end else Edit1.SetFocus; end; procedure TForm1.
NM
UDP
1DataReceived(Sender: TComponent; NumberBytes: Integer; FromIP: String; Port: Integer); var MyStream: TMemoryStream; TmpStr: String; begin MyStream := TMemoryStream.Create; try
NM
UDP
1.ReadStream(MyStream); SetLength(TmpStr,NumberBytes); MyStream.Read(TmpStr[1],NumberBytes); Memo1.Lines.Add(TmpStr); //显示对话的内容. 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 //如果所说的内容不为空,且最后一个按键为"Enter",则发送。 begin
NM
UDP
1.ReportLevel := Status_Basic;
NM
UDP
1.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; Memo1.Lines.Add(TmpStr); //显示对话的内容. try MyStream.Write(TmpStr[1], Length(Edit1.Text)); if ListBox1.ItemIndex=0 then begin for i:=1 to ListBox1.Items.Count-1 do begin
NM
UDP
1.RemoteHost :=ListBox1.Items[i];
NM
UDP
1.SendStream(MyStream); end; end else begin
NM
UDP
1.RemoteHost :=ListBox1.Items[ListBox1.itemindex];
NM
UDP
1.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 //增加网友,输入的可以是IP地址或计算机名称。 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; procedure TForm1.FormCreate(Sender: TObject); var sz: dword; begin memo1.Text:=' '; sz := SizeOf(Computername); GetComputerName(ComputerName, sz);//得到本机的标识 ListBox1.Items.Clear; ListBox1.Items.Add('大家');//在网友清单中,增加"大家"和 ListBox1.Items.Add(ComputerName);//本机名称 ListBox1.ItemIndex:=0; end; end.
Fastnet.rar_FastNet delphi7_
NM
HTTP pas_
NM
Http.pas_fastnet_
nm
udp
控
Fastnet
控件
内含
nm
udp
delphi7版
SKY源码+
控件
包
AboutUnit.dfm AboutUnit.pas ActionSpeedConfig.dfm ActionSpeedConfig.pas AddGuild.dfm AddGuild.pas BnkEngn.pas Castle.pas CastleManage.dfm CastleManage.pas ConfigGameShop.dfm ConfigGameShop.pas ConfigMerchant.dfm ConfigMerchant.pas ConfigMonGen.dfm ConfigMonGen.pas DBLogDlg.dfm DBLogDlg.pas DBPWDlg.dfm DBPWDlg.pas EDcode.pas Envir.pas Event.pas FrnEngn.pas FSrvValue.dfm FSrvValue.pas FunctionConfig.dfm FunctionConfig.pas GameCommand.dfm GameCommand.pas GameConfig.dfm GameConfig.pas GeneralConfig.dfm GeneralConfig.pas GlobaSession.dfm GlobaSession.pas Guild.pas HumanInfo.dfm HumanInfo.pas IdSrvClient.dfm IdSrvClient.pas InterMsgClient.dfm InterMsgClient.pas InterServerMsg.dfm InterServerMsg.pas IP.dfm IP.pas ItemSet.dfm ItemSet.pas ItmUnit.pas JClasses.pas JNetwork.pas JSocket.pas License.inc LocalDB.dfm LocalDB.pas M2Server.cfg M2Server.dof M2Server.dpr M2Server.drc M2Server.res M2Server.~dpr M2Share.pas Magic.pas MD5Unit.pas Mission.pas MonsterConfig.dfm MonsterConfig.pas
nm
const.pas
NM
UDP
.pas NoticeM.pas ObjAxeMon.pas ObjBase.pas ObjGuard.pas ObjMon.pas ObjMon2.pas ObjMon3.pas ObjNpc.pas ObjRobot.pas OnlineMsg.dfm OnlineMsg.pas RunDB.pas RunSock.pas svMain.dfm svMain.pas UnitManage.pas untTQQWry.pas UsrEngn.pas ViewKernelInfo.dfm ViewKernelInfo.pas ViewLevel.dfm ViewLevel.pas ViewList.dfm ViewList.pas ViewOnlineHuman.dfm ViewOnlineHuman.pas ViewSession.dfm ViewSession.pas
Delphi平台
NM
UDP
实现的屏幕截图传输
Delphi平台
NM
UDP
实现的屏幕截图传输
nm
udp
屏幕 delphi 截屏 截图 传输
网络及通讯开发
1,316
社区成员
8,873
社区内容
发帖
与我相关
我的任务
网络及通讯开发
C++ Builder 网络及通讯开发
复制链接
扫一扫
分享
社区描述
C++ Builder 网络及通讯开发
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章