开发一个基于DCOM的局域网聊天室(三)[8]

[入库:2005年8月18日] [更新:2007年3月24日]

本文简介:选择自 hkbarton 的 blog

  tempname:=speaktocbx.text;

  speaktocbx.clear;

  speaktocbx.items.assign(listbox1.items);

  speaktocbx.items.insert(0,'所有人');

  for i:=0 to speaktocbx.items.count-1 do

  begin

   if speaktocbx.items[i]=tempname then break;

  end;

  if i>speaktocbx.items.count-1 then i:=0;

  speaktocbx.itemindex:=i;

  //////////////////////////////////////////////////////////////////

 except //异常处理

  on e:exception do

  begin

   timer1.enabled:=false;

   application.messagebox

    (pchar('通信中断或服务器故障,点确定后将关闭程序,请稍后重启动。详细中断原因:'+e.message),'dcomchatclient',mb_iconwarning);

   application.terminate;

  end;

本文关键:Delphi,COM,DCOM,OOD,hkbarton
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top