2 Replies - 1006 Views - Last Post: 22 February 2012 - 08:21 AM Rate Topic: -----

#1 superkb10   User is offline

  • D.I.C Regular

Reputation: 29
  • View blog
  • Posts: 298
  • Joined: 27-November 11

Designating a transparent color on a picturebox

Posted 21 February 2012 - 12:06 PM

Hello, I'm going to be submitting a game into a competition, and normally I'd use XNA, but this game has to have Math involved in it, due to the fact that it's being sponsored by PBS so I am using Windows Forms so I have easier text input and I just don't know how to connect to a DB with XNA. Anyway, I want to put in pictures, but I want to be able to make a certain color transparent for a PictureBox. Does anyone know how?
Is This A Good Question/Topic? 0
  • +

Replies To: Designating a transparent color on a picturebox

#2 Curtis Rutland   User is offline

  • (╯□)╯︵ (~ .o.)~
  • member icon


Reputation: 5104
  • View blog
  • Posts: 9,283
  • Joined: 08-June 10

Re: Designating a transparent color on a picturebox

Posted 21 February 2012 - 12:22 PM

Reading through this might help a bit:

http://stackoverflow...nt-seem-to-work

Apparently you can't just pick a color and say "this is transparent now", but you could do that programatically.
Was This Post Helpful? 1
  • +
  • -

#3 tlhIn`toq   User is offline

  • Xamarin Cert. Dev.
  • member icon

Reputation: 6535
  • View blog
  • Posts: 14,450
  • Joined: 02-June 10

Re: Designating a transparent color on a picturebox

Posted 22 February 2012 - 08:21 AM

Even if you do set it programmatically, it still sucks. Transparant isn't true transparent in a picturebox. Meaning you won't see other stacked pictureboxes through it, other controls under it and so on. Transparent to a picturebox really means 'copy the base color of form/control below me'.

The link Curtis provided spells it out, but its not a quick 123 as it would first seem.
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1