DELPHI技术

博客园 首页 新随笔 联系 订阅 管理

文章分类 -  程序源码

自己或别人在优秀源代码
摘要:是仿Excel 金额转换,不限金额长度。 const NumberArray: array[0..9] of string = ('零', '壹','貳','叁','肆','伍','陆','柒','捌','玖'); // 数字转与大写function GetMoneySwitch(AMoney: string): string; // 去除所有分隔符 procedure Clea... 阅读全文
posted @ 2005-11-19 09:20 DELPHI技术 阅读(1630) 评论(0) 推荐(0)

摘要:这是一个四舍五入的函数,具体用法 myround(1.999,2) = 2.00 第一位1.999为要四舍五入的数,2为要取的小数位。 function myround(const yuan: Extended; const pp: Integer): Extended;//yuan:原浮点数,PP保留 小数点后第几位var p,l,m,l2:Longint; s:string; // 原浮点... 阅读全文
posted @ 2005-11-19 09:18 DELPHI技术 阅读(696) 评论(0) 推荐(0)

摘要:procedure OpenChildForm(FormClass: TFormClass; var Fm; AOwner:TComponent);var I: Integer; Child: TForm;begin for I := 0 to Screen.FormCount - 1 do if Screen.Forms[I].ClassType = FormClass then ... 阅读全文
posted @ 2005-11-19 09:15 DELPHI技术 阅读(435) 评论(0) 推荐(0)

摘要:uses TLHelp32,PsAPI; (1)显示进程列表:procedure TForm1.Button2Click(Sender: TObject);var lppe: TProcessEntry32; found : boolean; Hand : THandle; P:DWORD; s:string;begin ListBox1.Items.Clear ; ... 阅读全文
posted @ 2005-11-19 09:13 DELPHI技术 阅读(378) 评论(0) 推荐(0)

摘要:uses dao97,dao2000; procedure CompactMdbDatabase(srcDbname,dstDbname,oldpwd,newpwd:string;bAccess97:boolean=true);var idbEngine:_dbEngine;begin if oldpwd '' then oldpwd := ';pwd='+oldpwd; if newpw... 阅读全文
posted @ 2005-11-19 09:09 DELPHI技术 阅读(237) 评论(0) 推荐(0)

摘要:{============================================================= 功 能: 网络函数库 时 间: 2002/10/02 版 本: 1.0 备 注: 没有事情干,抄抄写写整理了一些网络函数供大家使用。 希望大家能继续补充===============================================... 阅读全文
posted @ 2005-11-19 09:07 DELPHI技术 阅读(310) 评论(0) 推荐(0)

摘要:strPcopy(BaseDbName,A_BaseName);gettemppath setlength(tmpFile,MAX_PATH); GetTempFileName(ExtractFilePath(application.ExeName),'',0,pchar(tmpFile));================================== 目录与文件 =======... 阅读全文
posted @ 2005-11-19 09:06 DELPHI技术 阅读(273) 评论(0) 推荐(0)

摘要:'插入表格Sub setTable() Set myRange = ActiveDocument.Range(Start:=2, End:=2) ActiveDocument.Tables.Add Range:=myRange, NumRows:=3, NumColumns:=4End Sub '取得Word常规字符串Sub getText() Set myRange = ActiveD... 阅读全文
posted @ 2005-11-19 09:04 DELPHI技术 阅读(470) 评论(0) 推荐(0)