随笔 - 2146  文章 - 19 评论 - 11846 阅读 - 1267万

02 2012 档案
执行 Application.Terminate 后, OnDestroy 中的代码还会执行
摘要:执行 Application.Terminate 后, OnDestroy 中的代码还会执行, 但不会理会 OnCloseQuery、OnClose 中的代码了.procedure TForm1.Button1Click(Sender: TObject);begin// SendMessage(Application.Handle, WM_CLOSE, 0, 0);// SendMessage(Handle, WM_CLOSE, 0, 0);// Halt(0);// PostQuitMessage(0); Application.Terminate;end;procedure TF... 阅读全文
posted @ 2012-02-14 23:15 万一 阅读(4344) 评论(4) 推荐(0) 编辑
一组文件名(主要以数字命名), 我想按数字大小排序
摘要:uses System.IOUtils, System.Types, System.Generics.Collections, System.Generics.Defaults, System.Character;procedure StrArrNumberSort(var Arr: TArray<string>);begin TArray.Sort<string>(Arr, TComparer<string>.Construct( function (const s1,s2: string): Integer var L1,L2: string; ... 阅读全文
posted @ 2012-02-10 15:57 万一 阅读(7352) 评论(1) 推荐(1) 编辑
给 System.Zip 增加了个(多文件解压时的)解压进度事件
摘要:很喜欢 System.Zip; 手头的程序需要把压缩后的一组文件从内存流解压, 这用 System.Zip 非常简单, 但我需要呈现解压进度, 同时给出当前文件名.因此给 System.Zip.TZipFile 添加了一个 OnUnZipProgress 事件.在 System.Zip 的基础上添加了不足 10 行代码, 新加代码都在行尾标记了 ///.修改后的文件(Zip2.pas):unit Zip2;interfaceuses System.SysUtils, System.IOUtils, System.Generics.Collections, System.Classes;... 阅读全文
posted @ 2012-02-04 13:51 万一 阅读(6130) 评论(10) 推荐(2) 编辑



点击右上角即可分享
微信分享提示