程序a定义<br>private<br>procedure Sel_win_Change(var msg:TMessage); message 11111;<br>procedure TMainForm.Sel_win_Change(var msg: TMessage);<br>begin<br>if trim(floattostr(msg.WParam))='19801129' then<br>application.Terminate<br>end;<br>程序b中的关闭事件中定义<br>var form_hw:HWND;<br>form_hw:=FindWindow(nil,'程序a定义那个响应事件的窗体的caption');<br>if boolean(form_hw) then<br>SendMessage(form_hw,11111,19801129,0);