[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Transparency of a label on a picturebox

Posted on 2004-07-31
2
Medium Priority
?
693 Views
Last Modified: 2006-11-17
When a label is placed on top of  a picturebox containing an image,
and the backcolor of the label is set to transparent, it does not work.
The backcolor of the label is stil grey. How can I fix this ???

Thanks...
0
Comment
Question by:Vermeij
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 86

Expert Comment

by:Mike Tomlinson
ID: 11685910
When the Backcolor of a control is set to Transparent it takes on the colors of its Parent container.  The PictureBox control is NOT a container, so the Label is most likely getting its background color from the Form itself.

One way around this is to use a Panel control instead of a PictureBox.  Set the BackgroundImage property to the picture you want to display and place the Label inside the Panel.  Now when the BackColor of the Label is set to Transparent, the picture will show through the Label as expected.

Regards,

Idle_Mind

0
 
LVL 4

Accepted Solution

by:
srcalc earned 375 total points
ID: 11686044
you can change the label.parent property to your picturebox.

Dim myLabel as new Label
myLabel.Parent = myPictureBox
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question