Question:
Transparent Buttons in Visual Basic 2005?
frostlight
2008-10-22 11:41:51 UTC
Using Microsoft Visual Studio 2005 (VB 2005?), Im trying to make a simple adventure game, where I have a picture box with the background image (house), and buttons on top of that to click (books, under bed, etc).

I want the buttons to be transparent, except for the text AND for there to be a color border (both visible). How can I make this button? I tried setting the backcolor property to Transparent, but its not working...

Thanks again for the help
Three answers:
anonymous
2008-10-22 11:50:54 UTC
In VB6 you can use a picturebox control to do that. It may work in VB 2005.
spopt36
2008-10-22 12:06:12 UTC
I remember having a LOT of trouble getting transparent controls to be transparent when on top of a picture, they'd just show the background color/image of the form, instead of the picturebox directly beneath it (this happened while setting the backcolor property to transparent like you describe). I had this problem on the compact .NET framework 2.0 though. And I never found a simple solution. I think there was a solution, but it involved messing around with stuff I didn't have time to mess with. Also, some controls just don't support transparency.



If you don't plan having the layout of the room/house ever changing, you may want to use an ImageMap control instead. If you do plan on having it change, it might be easiest to tile ImageButtons together to make a larger image with multiple clickable parts, then swap out individual tiled images to change part of the layout. A pain in the butt, I know, but that's all I can think of. Hopefully someone more experienced than me will know.
roblerogonzalez
2016-10-07 09:10:11 UTC
From a layout point of view, if a consumer HAS to keep the tips before they might change tabs, why do no longer you place the code for saving the tips under the press journey for yet another tabpage? Forgive me, in view that i haven't used VB for a pair of 12 months, yet i think of you additionally can set all the different buttons to be non-clickable or to throw message packing boxes while they are clicked on until eventually information is saved.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...