Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2013-06-06
4
Medium Priority
?
612 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 2000 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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
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…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…

636 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