摘要:
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 阅读全文
摘要:
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; 阅读全文
摘要:
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 阅读全文
摘要:
SendMessage(Handle,WM_VSo,Line_donwn) 阅读全文