Solved

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

Posted on 2013-06-06
4
603 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
[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
  • 3
4 Comments
 
LVL 86

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

Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

Question has a verified solution.

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

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
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…

733 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