透明FORM
将一个FORM变成透明的实质性手段就是拦截CMEraseBkgnd消息。
unit Utransform
interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, ExtCtrls
type TForm1 = class(TForm)
private { Private declarations }
public { Public declarations }
PROCEDURE CMEraseBkgnd(var Message:TWMEraseBkgnd);Message WM_ERASEBKGND;
end;
var Form1: TForm1;
implementation
{$R *.DFM}
PROCEDURE Tform1.CMEraseBkgnd(var Message:TWMEraseBkgnd);
BEGIN
brush.style:=bsClear;
Inherited;
END;
end.