📄 showcards.pas
字号:
unit ShowCards;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, DB, Grids, DBGrids, StdCtrls;
type
TCustomDBGridCracker = class(TCustomDBGrid) ;
TFrm_ShowCards = class(TForm)
DataSource1: TDataSource;
DBGrid1: TDBGrid;
Button3: TButton;
procedure FormShow(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure DBGrid1DrawColumnCell(Sender: TObject; const Rect: TRect;
DataCol: Integer; Column: TColumn; State: TGridDrawState);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Frm_ShowCards: TFrm_ShowCards;
implementation
uses sys_dm ;
{$R *.dfm}
procedure TFrm_ShowCards.FormShow(Sender: TObject);
begin
with frm_sys_dm.Qr_tmp1 do
begin
close;
sql.clear;
sql.text := 'select * from card';
open;
end;
end;
procedure TFrm_ShowCards.Button3Click(Sender: TObject);
begin
frm_sys_dm.Qr_tmp1.close ;
close;
end;
procedure TFrm_ShowCards.DBGrid1DrawColumnCell(Sender: TObject;
const Rect: TRect; DataCol: Integer; Column: TColumn;
State: TGridDrawState);
begin
with TCustomDBGridCracker(sender) do
begin
if DataLink.ActiveRecord = Row-1 then
begin
Canvas.Font.color := clred ;
Canvas.Brush.color := $00FFEEEE ;
end else
begin
Canvas.Font.color := clblack;
canvas.Brush.Color := clwhite;
end;
DefaultDrawColumnCell(Rect,DataCol,column,state);
end;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -