Mirage Source
VB6 - Transparent Picture Box - How? - Printable Version

+- Mirage Source (https://mirage-engine.uk/forums)
+-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61)
+--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18)
+---- Forum: Programming (https://mirage-engine.uk/forums/forumdisplay.php?fid=24)
+----- Forum: Visual Basic 6 (https://mirage-engine.uk/forums/forumdisplay.php?fid=32)
+----- Thread: VB6 - Transparent Picture Box - How? (/showthread.php?tid=2701)



VB6 - Transparent Picture Box - How? - Vortigem - 07-04-2009

In a previous post I was trying to figure out how to display a picture box as transparent. Several of you shared a few ideas with me (thank you very much) though I'm still trying to make it work.

In game, I have a picture box window that contains some command buttons and I would like to make the picture box itself transparent so players can only see the command buttons. I am told the best way to do this is to make the picture box a solid color and use a code to make that specific color transparent.

However, through my searching I haven't been able to find the proper code or guide for doing this (and I'm still familiarizing with VB6). Could anyone please lend a hand with what code I can use or an alternate method to accomplish what I am trying to do?

Thank you!


Re: VB6 - Transparent Picture Box - How? - KruSuPhy - 07-04-2009

http://www.freevbcode.com/ShowCode.Asp?ID=1903
Three seconds on Google


Re: VB6 - Transparent Picture Box - How? - Nean - 08-04-2009

Is the picture box necessary? Copy the command buttons, and then delete the picture box, and then paste the command buttons where the picture box was... Simple as that.


Re: VB6 - Transparent Picture Box - How? - Beres - 08-04-2009

When I read his post, I seen "In Game" so I am guessing he wants to place a transparent picture box over the game screen, put buttons in it so the button appear on the screen.. Maybe I am wrong.


Re: VB6 - Transparent Picture Box - How? - Matt - 08-04-2009

Beres Wrote:When I read his post, I seen "In Game" so I am guessing he wants to place a transparent picture box over the game screen, put buttons in it so the button appear on the screen.. Maybe I am wrong.

I don't think it will work. If I'm not mistaken, it'll happen the same way as if you tried to put a transparent richtextbox over the game screen. It'll fall behind the graphics being blit.

Either way, what Nean said would be his best bet. Less stress on the client and if he pastes the controls onto the picscreen (or where ever he wants it), it'll do exactly what he wants.