试了好久后,新建一form,增两个edit
unit Unit70;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, GridsEh, DBGridEh, DB, ADODB;
type
TForm70 = class(TForm)
Panel1: TPanel;
Edit1: TEdit;
Edit2: TEdit;
procedure FormClose(Sender: TObject;
var Action: TCloseAction);
procedure FormKeyPress(Sender: TObject;
var Key: Char);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form70: TForm70;
implementation
uses unit1,frm_Param,DBGridEhImpExp;
const
ScreenWidth: LongInt = 800;
{在分辨率为 800x600 的模式下编程.}
ScreenHeight: LongInt = 600;
{$R *.dfm}
procedure TForm70.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
form1.show;
end;
procedure TForm70.FormKeyPress(Sender: TObject;
var Key: Char);
begin
if key=#13 then
Perform(WM_NEXTDLGCTL,0,0);
end;
tabstop设true、taborder两个edit,一个设0,一个设1,按回车鍵能在两个edit中转换焦点。不过奇怪的是form属性中的keypreview却要设为false后才能正常运行!!!