ThePentiumGuy Posted August 7, 2003 Posted August 7, 2003 How would you set Transparency in a PictureBox? I tried setting the Form's TransparencyKey to Lime.. and that didnt work, is there any way i can do this? Quote My VB.NET Game Programming Tutorial Site (GDI+, Direct3D, Tetris [coming soon], a full RPG.... you name it!) vbprogramming.8k.com My Project (Need VB.NET Programmers) http://workspaces.gotdotnet.com/ResolutionRPG
*Experts* mutant Posted August 7, 2003 *Experts* Posted August 7, 2003 It should work, are you sure you matched the color? But that wouldnt work the best anyway. Becuase what was behind the form would show. You could do it another way. Get the picture box's image to a bitmap object, make it transparent using MakeTransparent() method and then assigning it back to the picturebox or refreshing the picture box. Quote
ThePentiumGuy Posted August 7, 2003 Author Posted August 7, 2003 yeah, thanks the thing is, im doing this for a tutorial on my site, so first im doing the basics(PictureBoxes then GDI+, and then hopefully, when i learn this, DirectX) for this tutorial, i used PictureBoxes(apparently) <-- the tutorial isnt out yet ill check weather the background is Lime(how can you check witout using Basic Colors such as Black?) Quote My VB.NET Game Programming Tutorial Site (GDI+, Direct3D, Tetris [coming soon], a full RPG.... you name it!) vbprogramming.8k.com My Project (Need VB.NET Programmers) http://workspaces.gotdotnet.com/ResolutionRPG
*Experts* mutant Posted August 7, 2003 *Experts* Posted August 7, 2003 (how can you check witout using Basic Colors such as Black?) Sorry, I dont get your question. Are you trying to check colors in some drawing program, your program or what? Quote
ThePentiumGuy Posted August 7, 2003 Author Posted August 7, 2003 oh ok, i meant this: when you edit your bitmap of your sprite in Microsoft Paint, you set a background color of him. and in your code, you say :ThisColor.MakeTransparent. But can you identify "ThisColor" if you choose a background color of a sprite, how can you identify it in "words".. how can you say, this color is Lime. In paint, you dont paint the "Lime" you paint Bright Green and guess its Lime. Is there anyway you can identify what color it is without guessing? Quote My VB.NET Game Programming Tutorial Site (GDI+, Direct3D, Tetris [coming soon], a full RPG.... you name it!) vbprogramming.8k.com My Project (Need VB.NET Programmers) http://workspaces.gotdotnet.com/ResolutionRPG
*Experts* mutant Posted August 7, 2003 *Experts* Posted August 7, 2003 Paint doesnt have that option, I dont think many programs have it. What you can do it to find a website which lists RGB values for colors and then add a custom color to the Paint's list that in the Colors menu. Quote
ThePentiumGuy Posted August 8, 2003 Author Posted August 8, 2003 oh yeah good idea thanks a lot Quote My VB.NET Game Programming Tutorial Site (GDI+, Direct3D, Tetris [coming soon], a full RPG.... you name it!) vbprogramming.8k.com My Project (Need VB.NET Programmers) http://workspaces.gotdotnet.com/ResolutionRPG
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.