Leonardo
Leonardo

Reputation: 11381

how to Paint non-client area in winForms transparent? .Net 4

im developing a custom form and i want that the non-client area be transparent. im handling the non client area painting via message number "0x85" and this is what i have tried so far:

Upvotes: 1

Views: 724

Answers (1)

Hans Passant
Hans Passant

Reputation: 941635

Getting parts of a window transparent requires hardware support, a video adapter feature called layering. Use the form's TransparencyKey property. Set it to an unusual color, like Color.Fuchsia. And draw with that color to get the video adapter to omit the pixels.

Upvotes: 1

Related Questions