让application广播消息是什么意思?如果要广播用 broadcast 就可以了。
当然响应代码要你自己写的。

解决方案 »

  1.   

    让application广播消息是什么意思?如果要广播用 broadcast 就可以了。
    当然响应代码要你自己写的。
      

  2.   

    发送消息用Dispatch(Msg),然后用GetMessage来接受消息,怎么不能做到
      

  3.   

    procedure TForm1.AppMessage(var Msg: TMsg; var Handled: Boolean);
    begin
      with Msg do
        if Msg = WM_SomeMsg then
          for I := 0 to Screen.FormCount - 1 do //其中一个
            //SendMessage(Screen.Forms[I].Handle, msg, LParam, WParam);
            //PostMessage(Screen.Forms[I].Handle, msg, LParam, WParam);
            //Screen.Forms[I].Perform(msg, WParam, LParam);
    end;procedure TForm1.FormCreate(Sender: TObject);
    begin
      Application.OnMessage = AppMessage;
    end;procedure TForm1.FormDeactivate(Sender: TObject);
    begin
      Application.OnMessage := nil;
    end;
      

  4.   

    postmessage(HWND_BROADCAST,WM_Close,0,0);
    这就是给所有的窗口发消息了。建议你用其它消息测试,不要用Wm_close;