摘要: 1.建立两个工程Server及Client分别放TServerSocket及TClientSocket控件,Demo,Edit控件等。2.设置TServerSocket name为 SS, ServerType为stNonBlocking,TClientSocket name为cs,ClientType为ctNonBlocking表示异步读写信息。注意ClientType和ServerType要相一致.若为ctBlocking则表示同步读写信息。3.Socket传送文件的顺序图a)Client-->Server MP_QUERYb)Server-->Client MP_ACCEPT 阅读全文
posted @ 2011-11-26 15:33 唯一的事 阅读(2472) 评论(0) 推荐(0) 编辑
摘要: progressbar1.Max:=myzip.ZipSize; procedure TForm1.myzipFilePercentDone(Sender: TObject; Percent: Integer); begin progressbar1.Position:=percent; end; procedure TForm1.myzipTotalPercentDone(Sender: TObject; Percent: Integer); begin progressbar2.Position:=percent; end; 阅读全文
posted @ 2011-11-26 07:08 唯一的事 阅读(410) 评论(0) 推荐(0) 编辑
摘要: function ZipFile(srcFile, dstFile: string):Boolean; //压缩单个文件 var VCLZip: TVCLZip; begin Result := False; VCLZip := TVCLZip.create(nil); if srcFile[Length(srcFile)] <> '\' then srcFile := srcFile + '\'; try with VCLZip do begin try ZipName := dstFile; RecreateDirs := True; Store 阅读全文
posted @ 2011-11-26 06:36 唯一的事 阅读(1548) 评论(0) 推荐(0) 编辑
摘要: SendMessage(Handle,WM_VSo,Line_donwn) 阅读全文
posted @ 2011-11-26 02:29 唯一的事 阅读(111) 评论(0) 推荐(0) 编辑