unit unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, ExtCtrls, Grids, shellapi;
type
TForm1 = class(TForm)
Edit1: TEdit;
Button1: TButton;
procedure FormCreate(Sender: TObject);
private
{ Private-Deklarationen}
public
procedure AppActivate(sender: tobject);
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.AppActivate(sender: tobject);
begin
Edit1.setfocus; // oder was auch immer
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
application.OnActivate := AppActivate;
end;
end.