05 2011 档案

StrFmt、StrLFmt: 针对 PChar 的格式化函数
摘要://StrFmt、StrLFmt:针对PChar的格式化函数varbuf:array[0..255]ofChar;p:PChar;beginp:=StrFmt(buf,'%d,%d',[123,MaxInt]);ShowMessage(buf);{123,2147483647}ShowMessage(p);{123,2147483647}p:=StrLFmt(buf,9,'%d,%d',[123,MaxInt]);ShowMessage(buf);{123,2147}ShowMessage(p);{123,2147}end; 阅读全文

posted @ 2011-05-19 22:51 jxgxy 阅读(482) 评论(0) 推荐(0)

UrlDownloadFile, 线程下载文件, 带进度条
摘要:unitFileDownLoadThread;interfaceusesClasses,SysUtils,Windows,ActiveX,UrlMon;constS_ABORT=HRESULT($80004004);typeTFileDownLoadThread=class;TDownLoadProcessEvent=procedure(Sender:TFileDownLoadThread;Progress,ProgressMax:Cardinal)ofobject;TDownLoadCompleteEvent=procedure(Sender:TFileDownLoadThread)ofob 阅读全文

posted @ 2011-05-11 21:58 jxgxy 阅读(2935) 评论(0) 推荐(0)

统一一个文件中bit位 1 的个数
摘要:unitCountThread;interfaceusesClasses,SysUtils,Dialogs,Math;typeTCountThread=class(TThread)privateFFileName:string;FFileSize:Int64;FOnStartCount:TNotifyEvent;FOnProcess:TNotifyEvent;FOnEndCount:TNotifyEvent;FSumBit:Int64;FBlockCount:Integer;functionCountBits(B:Byte):Integer;protectedprocedureExecute; 阅读全文

posted @ 2011-05-07 20:48 jxgxy 阅读(610) 评论(0) 推荐(0)

用批处理命令安装打印机
摘要:@echo offecho 添加打印机net use \×\IP\IPC$rundll32 printui.dll,PrintUIEntry /in /n \×\IP\前台打印机 echo 连接成功 按任意键退出pause>nul去掉上面的二个×号。 阅读全文

posted @ 2011-05-05 18:17 jxgxy 阅读(1775) 评论(0) 推荐(0)

导航