我想得到TPageControl的双击事件,像MyIe一样,双击时关闭当前的tabsheet,请问如何实现??非常感谢!!flyday.

解决方案 »

  1.   

    一点分都不给,你行 ||-_-!!  if (pagecontrolfcp.PageCount > 0)and(Msg.message = WM_LBUTTONDBLCLK) then
      if Msg.hwnd=PageControlfcp.ActivePage.Handle then
      begin
        runFileClose(Currenteditor);//鼠标双击执行的操作
      end;
      Handled:=False;
      

  2.   

    procedure TfrmFcp.FormCreate(Sender: TObject);
    begin
      Application.OnMessage:=AppMessage;
    end;procedure TfrmFcp.AppMessage(var Msg: TMsg; var Handled: Boolean);
    begin
      if (pagecontrolfcp.PageCount > 0)and(Msg.message = WM_LBUTTONDBLCLK) then
      if Msg.hwnd=PageControlfcp.ActivePage.Handle then
      begin
        runFileClose(Currenteditor);
      end;
      Handled:=False;
    end;