ds******@gmail.com wrote:
Hi. I wanted to create a non rectangular form (Winamp, BSPlayer), and I
followed the instructions in MSDN on the topic. Created a bitmap, set
the background color of the bitmap to blue 0000ff, set the bitmap as my
form background, set the transarency parameter of the form to 0000ff,
set border style to none and guess what, nothing happened. :) So I'm
asking for help.
Thank you...
It's really not the right way of creating a non-rectangular form.
Because what you are trying to do is still a rectangular form with some
parts hidden.
You need to use Form.Region property to set your form position and
shape. For that you need to create a GraphicsPath instance, provide a
shape and assign it to the form:
GraphicsPath gp = new GraphicsPath(FillMode.Alternate);
gp.AddEllipse(new Rectangle(1,1,100,100));
YourForm.Region = new Region(gp);
This is a good place to start with...
Hope it helped,
MuZZY