khxx6.pas
来自「一个比较实用的配送管理系统,Delphi+SQL开发」· PAS 代码 · 共 46 行
PAS
46 行
unit khxx6;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Buttons, Grids, DBGrids, ExtCtrls, DB;
type
TForm50 = class(TForm)
Panel1: TPanel;
DBGrid1: TDBGrid;
DataSource1: TDataSource;
procedure DBGrid1DblClick(Sender: TObject);
procedure DBGrid1KeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form50: TForm50;
implementation
uses Data1,pssqgl;
{$R *.dfm}
procedure TForm50.DBGrid1DblClick(Sender: TObject);
begin
Form29.StringGrid1.Cells[5,Form29.StringGrid1.RowCount-1]:= DataModule1.ADOQuery2.FieldByName('客户编号').AsString;
Form29.StringGrid1.Cells[6,Form29.StringGrid1.RowCount-1]:= DataModule1.ADOQuery2.FieldByName('客户全称').AsString;
Self.Close;
end;
procedure TForm50.DBGrid1KeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
if DataModule1.ADOQuery2.Active = True then
if Key = Vk_ReTurn then
DBGrid1.OnDblClick(Sender);
end;
end.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?