就像dialog一样,但是由于某些原因不能直接用窗口的ShowModal。还有其他什么方法吗?

解决方案 »

  1.   

    我傻,原来From在visible为true的时候不能showmodal的。
    为什么关毕该窗口后为什么点击其他窗口都没反应了@_@
    在“确定”里直接用visible := false来隐藏窗口的...正确该怎么做....
      

  2.   

    下面是showmodal窗口“确定”按钮的程序,只看最后一句就好了,怎么将这个窗口正确得关闭啊
    procedure TFontSet.btOKClick(Sender: TObject);
    var
      abmp : Tbitmap;
      width, height : Integer;
    begin
      TextRect := GetRect;
      width := TextRect.Right - TextRect.Left;
      Height := TextRect.Bottom - TextRect.Top;
      abmp := Tbitmap.Create;
      try
        aBmp.Width := Width;
        aBmp.Height := Height;
        Bitblt(abmp.Canvas.Handle, 0, 0, width, height, TextImage.Canvas.Handle,TextRect.Left, TextRect.Top, SRCCOPY);
        FTextBmp.Assign(abmp);
      finally
        abmp.Free;
      end;                   //上面的程序都是为了传出一张bitmap,可以忽略不看
      Fontset.Visible := false;
    end;