Solved

Need Help Placing Design Time Labels in PictureBox Using Visual Studio 2008

Posted on 2013-06-06
4
594 Views
Last Modified: 2013-06-08
Hello,

I am building a Windows PC application using VS 2008 in the .NET 3.5 Framework (VB.NET).

I have some Labels created in design time that I need encapsulated in a PictureBox which is also created in design time.  At current the parent for the Labels appears to be my DialogBox, and with or without the PictureBox present the Labels don't show at runtime.  I've attempted "Bring To Front" for the Labels and PictureBox, but it doesn't help.

I would like to know how to make the PictureBox the parent of the Labels (I suspect at present the DialogBox is the parent of the Labels).  I also tried cutting and pasting the Labels, with the PictureBox selected, but it did not make the PictureBox the parent object.  It seems that other elements on the DialogBox are hiding the Labels.

Thanks very much,
Stu Engelman
0
Comment
Question by:stuengelman
  • 3
4 Comments
 
LVL 85

Accepted Solution

by:
Mike Tomlinson earned 500 total points
ID: 39225615
The IDE won't allow the PictureBox to be the Parent of the Labels.  *It is technically possible to do that via code at run-time though.

Have you tried selecting the PictureBox and using "Send to Back"?

You also could use a Panel instead of a PictureBox, and set the BackgroundImage() and BackgroundImageLayout() properties.  This would allow the Labels to be properly moved into the Panel.
0
 

Author Comment

by:stuengelman
ID: 39225765
Thanks Idle,

Will try out your suggestions and report back.

Stu
0
 

Author Comment

by:stuengelman
ID: 39231653
Hi Idle,

Using PictureBox and "Send to Back" fixed it.

Thanks so much, Stu
0
 

Author Closing Comment

by:stuengelman
ID: 39231654
Very good help, fast reply.  Thank you.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

920 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now