0

Possible Duplicate:
Winforms semi-transparent PNG over semi-transparent PNG

I am about to make a project of the game Risk in school and my teacher said that's possible, but we are only to use Windows Form and not XNA or other tools.

In Risk, as you probably know if you know the game, the map is built up on many countries and every country should be it's own picture, since it has it's own effects, so to say.

So is it possible, with PictureBox, so change it to have a "transparental" effect and cover the picture only and not be like a box around the picture?

Sorry if this was a bad written description!

Community
  • 1
  • 1
JakobMiller
  • 323
  • 6
  • 19
  • Please improve your question, I don't know what you are asking. – marknuzz Oct 24 '12 at 08:57
  • You should explore the idea of creating your own control if you want "effect" or specific rendering of a picture. It's really not hard. – LightStriker Oct 24 '12 at 08:57
  • @Nuzzolilo It's difficult trying to explain in English. But I want to take a picture and make the PictureBox ONLY cover the picture, and not as a square box around the picture. – JakobMiller Oct 24 '12 at 08:59

1 Answers1

0

Afaik, it's not possible, to make picturebox handle transparent backgrounds. Generally, winforms has bad support for transparency.

The best solution is to write your own UserControl which draws the images of the countries.

Have a look at:

MartinStettner
  • 28,719
  • 15
  • 79
  • 106