?? 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 + -