🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.pascal.delphi.misc
Article #553

Re: How to make the FORM transparent !!!!

#553
From: SnipeZ
Date: Thu, 17 Jun 1999 00:00
30 lines
1761 bytes
Chow Hoi Ka, Eric wrote:

> Hello,
>
> Is is possible to make the FORM transparent ?
>
> Best regards,
> Eric

Yes it's possible ! :)
If you would only ommit the background erase of a form it won't be
transparent anymore when you move it. So you have to find a way to not
obscure the parts of the window between its controls. Doing this is
actually quite easy...
In win32 a window can have a window region. Pixels outside this region
are not part of the window and will therefore not obscure the
background. A region is really a set of standard geometric figures, so
it can hold rectangles, polygons and circles.
By only including the rectangles of the controls on your form, the form
itself will not be part of your window, thus leaving the window (or
desktop) behind it alone.
Look up the SetWindowRegion function in the win32api help file for
details.

This way you can create fun windows that are round or have holes in them
:)

have fun,

SnipeZ
Technical Details
Message-ID: <37691BEE.BE0F2A88@casema.net>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <37687007.E03C9970@sftw.umac.mo>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1091e5,cb5b86d88de05fbc
X-Google-Attributes: gid1091e5,public
X-Google-Thread: 10baee,cb5b86d88de05fbc
X-Google-Attributes: gid10baee,public
From: SnipeZ <kamail@casema.net>
Subject: Re: How to make the FORM transparent !!!!
Date: 1999/06/17
Message-ID: <37691BEE.BE0F2A88@casema.net>
X-Deja-AN: 490712721
Content-Transfer-Encoding: 7bit
References: <37687007.E03C9970@sftw.umac.mo>
Content-Type: text/plain; charset=us-ascii
X-Complaints-To: abuse@casema.net
X-Trace: news.casema.net 929635293 27090 212.64.0.119 (17 Jun 1999 16:01:33 GMT)
Organization: Casema Internet
Mime-Version: 1.0
NNTP-Posting-Date: 17 Jun 1999 16:01:33 GMT
Newsgroups: comp.lang.pascal.delphi.misc,borland.public.delphi.winapi