Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do i bring a label infront of a picture box

Status
Not open for further replies.

34534534534555

IS-IT--Management
Jan 8, 2003
240
GB
Hi all

I have tried using the Align command and bring to front and send to back but the labels always stay behind the picture box and wont apppear infront of. I am sure it is simple i just cannot see it.

Additionally, is it possible to set a text box's back colour to transparent?? so you can only see the text displyed, you can do it for a label but does not seem to work for a text box

TIA.. __________________________________
Create like a God, Command like a King, Work like a slave..
 

Try Zorder of the lable and/or pictuer box.

Without API's you could set the backcolor of the text box to the forms back color but that is probably not going to help since you are probably using it over the picture box that is holding your graphic.

Good Luck

 
You can not bring a label in front of a Picture box. The picture box is the Top layer of the three layers while the Label is in the Middle layer. The only way to do it is to put the label inside a PictureBox container and use the Zorder of the PictureBox.

Doc for ZOrder
"Three graphical layers are associated with forms and containers. The back layer is the drawing space where the results of the graphics methods are displayed. Next is the middle layer where graphical objects and Label controls are displayed. The front layer is where all nongraphical controls like CommandButton, CheckBox, or ListBox are displayed. Anything contained in a layer closer to the front covers anything contained in the layer(s) behind it. ZOrder arranges objects only within the layer where the object is displayed." Forms/Controls Resizing/Tabbing Control
Compare Code (Text)
Generate Sort Class in VB or VBScript
 

JohnYingling,

You are so right! RTF, thought control over control IN pic box. Thanks

 
One approach that you might be able to use is to place the picture box inside of 1 frame, and place the label inside of a second frame. Then position the frames in front of and behind each other as appropriate.
Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
Simular, you can put the label in it's own picture box and then use zorder on the picture box's.
 
I put the label in a frame and place it over the picture box. Only problem is you cant make the label transparent over the picture unless the picture is actually on the form instead of in a picture box
 
Thanks for all your replys, lots of food for thought, i will try putting the label inside a picture box container first, will let you know how i get on.

Toodle Pip! __________________________________
Create like a God, Command like a King, Work like a slave..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top