不是MDI窗体,如何使一个窗体处于激活状态时,其它窗不能激活呢!

解决方案 »

  1.   

    在同一个应用程序中,只要用ShowModule就行了,
    我还是不明白你的意思,
    如果你想让窗体在最上层,
    则在窗体的属性里设置FormStyle为OnTop.
      

  2.   

    先用FindWindow这个API函数发现显示的窗体,再用EnableWindow这个API函数禁止对FindWindow得到的窗体进行的键盘和鼠标的操作.
      

  3.   

    //对不起,更正一下!!!unit Unit1;interfaceuses
      Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
      Dialogs, MyGraphicButton;type
      TForm1 = class(TForm)
        MyGraphicButton1: TMyGraphicButton;
      private
        procedure WMKILLFOCUS(var Msg: TMessage); message WM_KILLFOCUS;  public
        { Public declarations }
      end;var
      Form1: TForm1;implementation{$R *.dfm}{ TForm1 }procedure TForm1.WMKILLFOCUS(var Msg: TMessage);
    var
     myhandle: THandle;
    begin
     myhandle:=(msg.WParam);
     EnableWindow(myhandle,False);
     inherited;
    end;end.