你没说清楚。
var
Form1: TForm1;
Selected: boolean=false;
implementation
{$R *.DFM}
procedure TForm1.Edit1MouseMove(Sender: TObject;
Shift: TShiftState;
X,
Y: Integer);
begin
if not Selected then
Edit1.SelectAll;
end;
procedure TForm1.Edit1MouseDown(Sender: TObject;
Button: TMouseButton;
Shift: TShiftState;
X, Y: Integer);
begin
Selected := true;
end;
procedure TForm1.FormMouseMove(Sender: TObject;
Shift: TShiftState;
X,
Y: Integer);
begin
Selected := false;
end;
end.