Groups | Blog | Home
all groups > dotnet windows forms > june 2005 >

dotnet windows forms : custom shaped form


Herfried K. Wagner [MVP]
6/13/2005 12:00:00 AM
"billy" <billy_dev@REEMUVEcox.net> schrieb:
[quoted text, click to view]

I would not use a JPEG image. Instead, a lossless image format is
preferrable.

I downloaded a sample app from codeproject and
[quoted text, click to view]

Region from Bitmap
<URL:http://www.bobpowell.net/region_from_bitmap.htm>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
billy
6/13/2005 7:25:34 AM
I want to create a small app that uses a jpg as the main form's "face"
(i.e. windows media). I downloaded a sample app from codeproject and
noticed that, in the main code, the developer actually went through and
built up the region with a bunch of AddCurve() and AddLine() calls.
Isn't there a way to accomplish the custom shape by using a transparent
color in the bitmap? Also, what's the best or most common method of
using an image for the form? Thanks,

Phil Wright
6/15/2005 9:48:39 PM
Another approach would to be to use a Form instance and then define the
transparency key. So if you make everything you want to be transparent in
your Form to be pink, or some other colour unlikely to occur normally, you
just set the TransparencyKey to be Color.Pink and then fill the bmp parts
you want see tru as Pink.

Phil Wright
Follow my new microISV at...
http://componentfactory.blogspot.com

[quoted text, click to view]

AddThis Social Bookmark Button