Non rectangular forms, help needed!

  • Thread starter Marcos Beccar Varela
  • Start date
M

Marcos Beccar Varela

Hello to all! first, sorry for my bad english, but I´ll do my best.

I´m testing the 2005 VB.NET Express, and I need to make a Form with a non
rectangular shape.
I saw some somples where said this operations should be made to accomplish
that task.
I done them, but no transparency was made at the edges.

1 - To the form I asigned the image with LIME color at the area where should
by transparent and set the image in de BackgroundImage property

2 - I asign the TransparencyKey the SAME LIME color


For what I read that should be enoguh, but it doesnt work.
Thank you to all, i hope sameone know something about it.

Marcos
 
C

Chris Dunaway

How was the background image created? Did you match the RGB values for
the lime color to the rgb values used in the TransparencyKey?

Another way to have an irregularly shaped form is to use a region.
Create an instance of a GraphicsPath object. Use its methods to create
the shape you want. Then create a region from that graphics path.
Assign that region to the Form's region property.
 
M

Marcos Beccar Varela

Hello Chris, yes, I matched the color corectly, I double checked the RGB
values....
The second way you tell me I like it better. it seems I can make it without
an image, so I can manage it only with code
I will read about it.. but I´m quite newbbie.. mm very newbbie in .net.. so
hope it wnot take me too much time
Thank you!!
Marcos
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top