Solved

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

Posted on 2013-06-06
4
589 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
Comment Utility
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
Comment Utility
Thanks Idle,

Will try out your suggestions and report back.

Stu
0
 

Author Comment

by:stuengelman
Comment Utility
Hi Idle,

Using PictureBox and "Send to Back" fixed it.

Thanks so much, Stu
0
 

Author Closing Comment

by:stuengelman
Comment Utility
Very good help, fast reply.  Thank you.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
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:…
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…

771 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

11 Experts available now in Live!

Get 1:1 Help Now