| View previous topic :: View next topic |
| Author |
Message |
Earl F. Glynn Guest
|
|
| Back to top |
|
 |
Heinrich Wolf Guest
|
Posted: Thu Jul 24, 2003 8:21 pm Post subject: Re: Non rectangular forms |
|
|
I found that solution:
Set your form's borderstyle to bsNone.
Put an Image on it
Load a Picture of non rectangular shape into it at Designtime.
Set Transparent of that Image as True.
OnCreate of the Form set the Form's Brush.Style to bsClear.
|
|
| Back to top |
|
 |
James Allen Guest
|
Posted: Thu Jul 24, 2003 11:39 pm Post subject: Re: Non rectangular forms |
|
|
Delphi 7 has a TransparentColor property for forms so just do as Heinrigh
said but instead of setting the image to transp just set the forms transp
color to a color in the image that u want making clear and set transparency
to true for the form also.
U could also just use the forms color(change it to lime or something
obscure) as the transparency color then place a panel on the form or a shape
or what ever u want.
James..
"Heinrich Wolf" <Heinrich (AT) Wolf-Fuerth (DOT) de> wrote
| Quote: | I found that solution:
Set your form's borderstyle to bsNone.
Put an Image on it
Load a Picture of non rectangular shape into it at Designtime.
Set Transparent of that Image as True.
OnCreate of the Form set the Form's Brush.Style to bsClear.
|
|
|
| Back to top |
|
 |
Avatar Zondertau Guest
|
Posted: Fri Jul 25, 2003 7:20 am Post subject: Re: Non rectangular forms |
|
|
In this way the form is still rectangular, only you don't see it. To make a
form that really has a non-rectangular shape you need to use SetWindowRgn.
|
|
| Back to top |
|
 |
James Allen Guest
|
Posted: Sun Jul 27, 2003 3:02 pm Post subject: Re: Non rectangular forms |
|
|
no u dont, if u put an image on it thats any shape u want and the area u
want to be transparent is all one solid colour, usually lime or something
thats unlikely to be used anywhere else in the image u can make a form any
shape u want. I know what u mean that technically its still rectancular but
u cant click outside the solid area so its effectivly the shape of the
image.
James..
"Avatar Zondertau" <avatarzondertau (AT) hotmail (DOT) com> wrote
| Quote: | In this way the form is still rectangular, only you don't see it. To make
a
form that really has a non-rectangular shape you need to use SetWindowRgn.
|
|
|
| Back to top |
|
 |
Giovanni Filippini Guest
|
Posted: Mon Jul 28, 2003 10:07 am Post subject: Re: Non rectangular forms |
|
|
Please excuse my intrusion,
anyone can solve a dubt ?
It seems that in transparent forms (transparent images)
only 24 bits bitmaps are accepted (not 256 colors Bmp), otherwise the result
is
a black/white distorted image; is it so ?
Thank you in advance & regards,
Giovanni.
|
|
| Back to top |
|
 |
|