如题

解决方案 »

  1.   

    刚刚在写一个,查了DephiBBS的离线。
    设置Form的FormStyle ->fsStayOnTop
    覆盖Form的
      protected
        procedure CreateParams(var Params: TCreateParams); override;procedure TForm2.CreateParams(var Params: TCreateParams);
    begin
      inherited;
      with Params do
      begin
        Style := Params.Style xor WS_DLGFRAME;
        WndParent := 0;
      end;
    end;------------
    然后再Form的Create下面写
      SetWindowLong(Handle, GWL_EXSTYLE, WS_EX_TOOLWINDOW);
      

  2.   

    在主窗体的onActivate事件中写代码formX.ShowModal;  //formX为你要show出的form
      

  3.   

    setwindowpos(form.handle,HWND_TOPMOST,form.left,form.top,form.width,form.height,0);
      

  4.   

    用form.showmodal打开;
    用form.modalresult:=1关闭