type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var
form_hw:HWND;
begin
form_hw:=FindWindow(nil,'接收消息');
if boolean(form_hw) then
SendMessage(form_hw,WM_MESSAGETEST,0,0);
end;