10 2011 档案

摘要:该控件可以将任意文件打包进.dfm(使用zlib压缩),可以用该控件编写只有一个exe的绿色软件,或者用于自己编写安装程序。 使用非常简单,设计期将该控件放入form, 指定FileName属性即可将该文件内容打包进dfm中。运行时可以调用FileRes1.ResToFile解压到指定的文件内或通过FileRes1.ResToStream解压到一个stream中(比如图片文件,接下去可以用Bitmap.LoadFromStream读入),这两个函数的Keep参数指定是否在操作的同时释放FileRes中占用的内存(如果只需要在程序运行时解压一次则建议使用Keep := False; 这样可以降低 阅读全文
posted @ 2011-10-09 15:25 翔飞 阅读(249) 评论(0) 推荐(0) 编辑
摘要:{取某字符串出现的位置(返回str字符串中含有str1从a开始第B次出现的位置)}FUNCTION FStr_Instr(str,str1: string;a,b: integer): integer;var i,j: integer; num: integer ; str_tmp: string ;begin Result := 0 ;// str_tmp := str ; str_tmp := copy(str,a,length(str)) ;// num := FStr_Num(str,str1) ; num := FStr_Num(str_tmp,str1) ; if length(s 阅读全文
posted @ 2011-10-08 14:12 翔飞 阅读(304) 评论(0) 推荐(0) 编辑