Actually, it's very easy...
Start a new app and place the following in the formCreate:
[pascal]MakeInvisible(form1);[/pascal]
Add the following procedure:
[pascal]procedure MakeInvisible(const Form: TCustomForm);
var
hRgn: Cardinal;
i: Integer;
begin
with Form do
begin
BorderStyle := bsNone;
hRgn := CreateRectRgn(0, 0, 0, 0);
for i := 0 to ControlCount - 1 do
with Controls[i].BoundsRect do
CombineRgn(hRgn, hRgn, CreateRectRgn(Left, Top, Right, Bottom), RGN_OR);
SetWindowRgn(handle, hRgn, True);
end;
end;[/pascal]
Then in form onPaint:
[pascal]PaintDesktop(Canvas.Handle);[/pascal]
That's it, your form is invisible
Bookmarks