Solved

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

Posted on 2013-06-06
4
601 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
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…

809 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