October 29, 2002

Creating Non-Rectangular Windows

Here. "It's possible to change the shape of the form by making parts completely transparent. One way to do this is with the TransparencyKey property, which designates a color to use to mark transparent pixels. When a pixel on the form is supposed to be drawn with the transparent key color, that pixel will instead be removed from the form, both in the sense that the pixel will not be drawn over whatever is behind it and that clicking on that spot on the form will actually cause the click to happen on what's underneath." This is a little exerpt from the book about using WinForms to do non-rectangular forms and hit-testing.