BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Re: Non rectangular forms

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Graphics
View previous topic :: View next topic  
Author Message
Earl F. Glynn
Guest





PostPosted: Thu Jul 24, 2003 3:27 am    Post subject: Re: Non rectangular forms Reply with quote



"Shaid B" <Shaid_b (AT) hotmail (DOT) com> wrote

Quote:

how do i make non rectangular forms in delphi 7?

Find several links about "Non-Rectangular Windows" on this page:
http://homepages.borland.com/efg2lab/Library/Delphi/Graphics/Algorithms.htm


--
efg -- Earl F. Glynn, Overland Park, KS USA

efg's Computer Lab: http://www.efg2.com/Lab
Mirror: http://homepages.borland.com/efg2lab/Default.htm



Back to top
Heinrich Wolf
Guest





PostPosted: Thu Jul 24, 2003 8:21 pm    Post subject: Re: Non rectangular forms Reply with 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
James Allen
Guest





PostPosted: Thu Jul 24, 2003 11:39 pm    Post subject: Re: Non rectangular forms Reply with quote



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





PostPosted: Fri Jul 25, 2003 7:20 am    Post subject: Re: Non rectangular forms Reply with 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
James Allen
Guest





PostPosted: Sun Jul 27, 2003 3:02 pm    Post subject: Re: Non rectangular forms Reply with quote

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





PostPosted: Mon Jul 28, 2003 10:07 am    Post subject: Re: Non rectangular forms Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Graphics All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.