📄 khxx6.pas
字号:
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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -