随笔分类 -  Delphi

摘要:--中英文、中英标点及数字按视觉长度分割unit TextSplitByVisualWidth; interface uses System.SysUtils, System.Classes, System.Character; type TVisualTextSplitter = class pu 阅读全文
posted @ 2026-01-30 19:21 绿水青山777
摘要:--中英文按视觉长度分割unit TextSplitHelper; interface uses System.SysUtils, System.Classes, System.Character; type TTextSplitHelper = class public // 按指定视觉长度分割中 阅读全文
posted @ 2026-01-30 19:20 绿水青山777
摘要:function IsChinesePunct(const c: Char): Boolean;var charCode: Integer;begin charCode := Ord(c); // 匹配中文标点的核心Unicode区间 Result := (charCode >= $3000) an 阅读全文
posted @ 2026-01-30 17:02 绿水青山777
摘要:Delphi中取得程序版本号 Delphi做的程序,如果想包含版本信息, 必须在Delphi的集成编辑环境的菜单“Project/Options/Version Info”里面添加版本信息。即在Version Info 选项卡中选中“Include version information in pr 阅读全文
posted @ 2022-07-05 17:09 绿水青山777
摘要:function RoundFloat(f: double; i: integer): double;var s: string; ef: extended;begin s := '#.' + StringOfChar('0', i); ef := StrToFloat(FloatToStr(f)) 阅读全文
posted @ 2022-06-09 11:31 绿水青山777
摘要:function GetVer(FName: string): string;var InfoSize, Wnd: DWORD; VerBuf: Pointer; szName: array[0..255] of Char; Value: Pointer; Len: UINT; TransStrin 阅读全文
posted @ 2021-05-06 11:36 绿水青山777
摘要:// 根据cxCombox框选择,输出开始时间,结束时间procedure GetCurSetDate(AcxCombobox: TcxCombobox; var AFromDate, AToDate: TcxDateEdit);var iYear, iMonth, iDay: Word; iWee 阅读全文
posted @ 2021-05-06 10:10 绿水青山777
摘要:function SbctoDbc(s: string): string;var nlength, i: integer; str, ctmp, c1, c2: string;begin nlength := length(s); if (nlength = 0) then exit; str := 阅读全文
posted @ 2021-05-06 10:09 绿水青山777
摘要:微信公众号 个人中心不能显示数据 1. PKserver \ jar \ngius jar 。bat文件 双击 ngius。exe 绿色图标 阅读全文
posted @ 2021-02-08 10:43 绿水青山777
摘要: 阅读全文
posted @ 2020-12-16 14:32 绿水青山777
摘要:unit Unit1; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, V 阅读全文
posted @ 2020-10-16 16:58 绿水青山777
摘要:tvLBList.Items[0].MakeVisible; ListView1.Items[i].MakeVisible(True); //定位后显示出来 阅读全文
posted @ 2020-10-14 16:13 绿水青山777
摘要:procedure TfrmMain.DbGridEhToExcel(ADgEh: TDBGridEh);var ExpClass: TDBGridEhExportclass; Ext: string; FSaveDialog: TSaveDialog;begin try if ADgEh.Data 阅读全文
posted @ 2020-10-12 16:32 绿水青山777
摘要:/* 注册job 设置时间 必须在命令窗口内执行 Variable N Number; Begin DBMS_JOB.Submit(:N,'P_SCQBFY;',Trunc(Sysdate)+23/24,'Trunc(Sysdate+1)+23/24'); Commit; End;*/ CREATE 阅读全文
posted @ 2020-09-25 09:57 绿水青山777
摘要:function MyRound2(Money: Real): Real; //四啥五入 var Temp: Integer; begin if ((Money <= 0.04) and (Money >= 0)) then Money := 0.1 else if ((Money < 0) and 阅读全文
posted @ 2020-09-25 09:55 绿水青山777
摘要:1. C:\Documents and Settings\Administrator\.borland 下面的删除了,就OK了. 2.拷贝dent.slip文件,好了。 阅读全文
posted @ 2020-09-25 09:54 绿水青山777
摘要:发现Trunc函数错误 Trunc是取整函数,但不知为什么,本人在多台计算机上得出如下错误结果。大家不妨试试,知道答案的解析下 Trunc(2.1* 100) / 100 得出的结果不是2.1而是2.09 Trunc(4.7* 100) / 100 得出的结果不是4.7而是4.06 有知道问题的朋友 阅读全文
posted @ 2020-09-25 09:52 绿水青山777
摘要:项目中用了DBGridEh,同时也用了DBGrid。在OnDrawColmnCell事件中调用DefaultDrawColumnCell,编译时却提示Incompatible types错误。 其实问题很简单,就是因为DBGridEh在GridsEh单元中重新定义了TGridDrawState类型( 阅读全文
posted @ 2020-09-25 09:51 绿水青山777
摘要:4)全局变量的使用 在 Widnows 32 位程序中,两个应用程序的地址空间是相互没有联系的。DLL在内存中是一份拷贝,而变量是在各进程的地址空间中,因此不能借助DLL的全局变量来达到两个应用程序间的数据传递,除非使用内存映像文件。 library MyDLL; var OldExitProc : 阅读全文
posted @ 2020-09-25 09:48 绿水青山777