处理跟 WM_NCxxxx 有关的消息。自己好好研究一下。

解决方案 »

  1.   

    用 image 可以代替最小化、关闭按钮。可以在 image 的 OnClick 事件中通过函数实现:Application->Minimize(); 最小化
    Application->Terminate(); 关闭
      

  2.   

    由于我的无标题窗体可以移动,所以好象image的close 事件被屏蔽掉了,不知道该如何办才好?
    还请大哥们多多指点,拜托了!!
      

  3.   

    我也试了一下,的确是不响应事件。
    我的做法是:
    一、使窗体拖动
    //Form.BordStyl := bsNone
    procedure WMNCHitTest(var M: TWMNCHitTest); message wm_NCHitTest;//delareprocedure TForm1.WMNCHitTest(var M: TWMNCHitTest);
    begin
      inherited;//call the inherited message handler
      if M.Result = htClient then
        M.Result := htCaption;
    end;
    二、实现其最大化、最小化及关闭
    在窗体上先放置一Panel
    其具体的属性,你可以自己以具体情况设定。
    然后将你的最大化、最小化、关闭的图片置于其上。
    然后在其Click中编写如下事件就可以了。
    procedure cMax(Sender: TObject);//Max
    begin
        WindowState := wsMaximized;
    end;
    procedure cMin(Sender: TOjbect);//Min
    begin
        WindowState := wsMiximized;
    end;
    procedure cExit(Sender: TObject);//Close;
    begin
      Application.Terminate;
    end;
    当你用以上的方法做的时候,你就可以完全实现你所要的功能了。^&^