Picturebox question

Stormweaver1

Member
Joined
Jun 12, 2006
Messages
13
Programming Experience
Beginner
I am wondering how to make my main character transperent. Like the background behind him.

So basically I want a guy to be able to move ontop of other pictures and still be able to see the original picture.

Any help is apreciated:eek:
 

vis781

Well-known member
Joined
Aug 30, 2005
Messages
2,015
Location
Cambridge, UK
Programming Experience
5-10
Is it not possible to just hide the image of 'your guy' whilst he is on the parts you don't want to see him in? Or do you want to make him semi-transparent? I am a little confused at the question

Moved to GDI+ forum.
 

Stormweaver1

Member
Joined
Jun 12, 2006
Messages
13
Programming Experience
Beginner
Ok the game is click based, you click somewhere the main character guy becomes the image of the picturebox you just clicked,
"picturebox1.image = picturebox101.image"

lets say picturebox1 was a tree I don't want the tree to disapear I want the main character to be visible and the tree so I want picturebox101.image (main character)'s backgroud to be see through, so you can still see the tree, or the object

Thanx again
 

Guardian

Active member
Joined
Jan 19, 2005
Messages
44
Location
England
Programming Experience
5-10
you could cheat slightly and have the guys picture box a seperate picturebox, and then just move it to the appropriate place rather than combining the images?

cheating i know, but it could work :)
 

vis781

Well-known member
Joined
Aug 30, 2005
Messages
2,015
Location
Cambridge, UK
Programming Experience
5-10
If the guys background is all the same color and you are using a bitmap then the bitmap class has a 'maketransparent' method whereby you can make any particular color transparent at anytime.
 

Stormweaver1

Member
Joined
Jun 12, 2006
Messages
13
Programming Experience
Beginner
If the guys background is all the same color and you are using a bitmap then the bitmap class has a 'maketransparent' method whereby you can make any particular color transparent at anytime.


Thats what i want! thats what i want, ok i dont totally understand, but im gunna try my best thanx. Any clarification is great
 

vis781

Well-known member
Joined
Aug 30, 2005
Messages
2,015
Location
Cambridge, UK
Programming Experience
5-10
You may also want to have a fiddle with the graphics 'CompositingMode' For this to work you may have to set the CompositingMode to

VB.NET:
CompositingMode.SourceOver
 
Top Bottom