📄 xsxx.pas
字号:
unit xsxx;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Grids, DBGrids, StdCtrls, Buttons, ExtCtrls, DB;
type
TForm73 = class(TForm)
DataSource1: TDataSource;
DBGrid1: TDBGrid;
procedure DBGrid1DblClick(Sender: TObject);
procedure DBGrid1KeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form73: TForm73;
implementation
uses DataModal,xsthxt;
{$R *.dfm}
procedure TForm73.DBGrid1DblClick(Sender: TObject);
begin
with Form27 do
begin
StringGrid1.Cells[6,StringGrid1.RowCount-1]:= Data.ADOQuery2.FieldByName('客户全称').Value;
StringGrid1.Cells[5,StringGrid1.RowCount-1]:= Data.ADOQuery2.FieldByName('客户编号').Value;
end;
Close;
end;
procedure TForm73.DBGrid1KeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
if Data.ADOQuery2.Active = True then
if key = VK_Return then
DBGrid1.OnDblClick(Sender);
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -