SQL Server Replace函数
SQL SERVER中的替换函数 Read More…
– Charlie.Wang's API site
SQL SERVER中的替换函数 Read More…
在使用MS SQL Server查询字段值的时候,经常会遇到空值字段或者无值字段。 即 字段内容 = '' 或者字段内容 = NULL A = NULL B = '' 但是,它们的含义是不一样的,在查询的时候一定要注意。 好在MSSQL提供了一个内置函数ISNULL,利用它可以筛选出NULL值字段 — 删除所有为Read More…
unit ALScreenSnap; interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, ShellAPI; type TALScreenSnap = class(TComponent) private OldWndProc, NewWndProc: Pointer; fActive: Boolean; fThreshold: Integer; procedure NewWndMethod(var Msg: TMessage); public constructor Create(AOwner: TCRead More…
网上搜到的Delphi邮件发送系统,绝大多数是使用SMTP协议来发送。 但是事实上它们已经过时了,大多数邮件服务器已经屏蔽了Delphi Indy的邮件发送,从而导致Delphi发送不成功。 事实上,让Delphi通过Outlook.Application来发送邮件,也是非常方便的,而且没有那么多的限制。 以下是我目前使Read More…
当处理完TreeView控件树形结构的数据后,根据不同的树形节点Level,加上不同的图片。 图片的ImageList已经放置好,并且TreeView的Images已经连上带有图片的ImageList。 除了手动添加图片外,还可以通过代码,根据判断不同Level来批量添加图片,实现代码增加在TreeView的 GetImageIndex Read More…
当处理完TreeView控件树形结构的数据后,需要默认自动全部展开,可以用到TreeView的Expanded属性。 var icount : integer; begin RzTreeView1.Items.EndUpdate; //示例中用的是Raize中的RzTreeView组件 for icount := 0 to RzTreeView1.Items.Count-1 do RzTreeView1.Items[icount].Expanded:=True; RzTreeView1.Items.EndUpdate; end; Read More…
cxGrid默认不显示行号,但是可以通过cxGrid1DBTableView1CustomDrawIndicatorCell事件来重绘行号 选中cxGrid1DBTableView1,在OnCustomDrawIndicatorCell事件中,输入以下代码: procedure TForm1.cxGrid1DBTableView1CustomDrawIndicatorCell( Sender: TcxGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxCustomGridIndicatorItemViewInfo; var ADone: Boolean);Read More…
根据组件名称,来定位到组件,并且更改组件属性 主要用到Delphi FindComponent 函数 //循环将RzBackground1 – #12的图片改为Sample中的图片 for I := 1 to 12 do begin TRzBackground(FindComponent('RzBackground'+IntToStr(I))).Texture := RzBackground_Sample.Texture; end; //将组件名为ComponentName的标签名改为DMRead More…
CWMFoundation 意为 Charlie.Wang Foundation Mini(迷你版) 是作者工作中为方便代码编写,逐渐整理归档的一些代码集。 在原有CWFoundation的基础上,去除了大量窗体上的控件,只留下一个Delphi Pas文件的轻量级类。 Algorithm是用来存放算法的类。 //*********************************** //***** CWMFoundatRead More…
CWMFoundation 意为 Charlie.Wang Foundation Mini(迷你版) 是作者工作中为方便代码编写,逐渐整理归档的一些代码集。 在原有CWFoundation的基础上,去除了大量窗体上的控件,只留下一个Delphi Pas文件的轻量级类。 Keyboard主要用来处理按键,节约代码输入的时间。 //*****************************Read More…