这里有现成的。呵呵。
type
TForm1 = class(TForm)
Edit1: TEdit;
private
{ Private declarations }
procedure FORM_WMLBUTTONDOWN(var Message: TMessage);message WM_LBUTTONDOWN;
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
{ TForm1 }
procedure TForm1.FORM_WMLBUTTONDOWN(var Message: TMessage);
var
aPoint:TPoint;
Msg:TWMLBUTTONDOWN;
begin
inherited;
Msg := TWMMouse(Message);
apoint := Point(Msg.XPos,Msg.YPos);
if (0<aPoint.x)and(aPoint.x<200)and(0<aPoint.y)and(aPoint.y<200) then
postmessage(edit1.handle,WM_KeyDown,65,0);
end;
end.