I want to create a window similar to Spotify, there is no border or title bar and the corners are rounded.
I tried with using a transparent color, set it to 255,0,255 (pink) and tried to create rounded corners but it leaves a pink edge there.
So I need to:
- remove the title bar and border
- give the app rounded corners
Any help on the above 2 issues is much appreciated, thanks.
To remove the title bar and border, you can set your form’s
FormBorderStyletoNone. As for the rounded corners, you can use regions or theTransparencyKeyproperty (which you mentioned using – it won’t work if your form is double-buffered, in case that’s your issue) but those result in aliased edges. (I can’t download Spotify so I don’t know if it has that issue.) I believe it’s common (for effects like shadows) to take a screenshot (usingGraphics.CopyFromScreen) of the screen behind the form and draw on that.