471,337 Members | 1,070 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,337 software developers and data experts.

Non rectangular form

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...

Dec 24 '05 #1
3 1627
Can you show your code? It would be easier, since we have no clue if
you actually followed the MSDN article as you said.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

<ds******@gmail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
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...

Dec 24 '05 #2
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
Dec 25 '05 #3
Nicholas Paldino [.NET/C# MVP] wrote:
Can you show your code? It would be easier, since we have no clue if
you actually followed the MSDN article as you said.


I'm not sure if that MSDN article is up to date, as there is a standard
way of making a pure non-rectangular form - look in my other post for
the subj.

MuZZy
Dec 25 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Tony Reynolds | last post: by
5 posts views Thread by dln | last post: by
5 posts views Thread by Tiraman | last post: by
2 posts views Thread by Just close your eyes and see | last post: by
1 post views Thread by xllx.relient.xllx | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.