|
-
Sep 14th, 2001, 09:18 AM
#1
Thread Starter
Junior Member
label on top of a picture box does not display the caption at run time
hi! I am trying to create my own custom component for displaying and scrolling text. The way I am trying to achieve this is by having a PictureBox so I can set it's picture to whatever image I wish to to. I have 4 labels added on top of the textbox and the text is visible in the design mode but when I run the project the text is not displayed.
Can somebody please tell me why that is and if there is a way to display text on a textbox or form without making use of labels?!
Thank you
Why did I ever start learning VB?! I should have been happy with Java. 
-
Sep 14th, 2001, 09:29 AM
#2
Frenzied Member
Check the Z-Order property of the label and set it so that the label is on top of any other window.
-
Sep 14th, 2001, 09:34 AM
#3
Thread Starter
Junior Member
I am using vb6 and I did not find the property Z-Order.
Why did I ever start learning VB?! I should have been happy with Java. 
-
Sep 14th, 2001, 09:37 AM
#4
Frenzied Member
It is only available at run time. So, change it in the Form_Load event. It's a function not a property though.
-
Sep 14th, 2001, 11:00 AM
#5
Fanatic Member
I'm not sure what the textbox part came from since you were talking about labels, but you won't be able to actually make them appear over other things. Since they aren't really windows, they are painted directly onto the form, so any control sitting on the form will already be over top of them. Is there a reason why you didn't want to use labels in the first place (since you asked for a way around that at the very end of your post)? There is a way around it though. What you may have done when making your control is not actually make the labels be contained within the picturebox. If you make sure to draw the labels inside the picturebox when it is selected (just click on it once, then select the label tool and draw it in), it will be contained within that window. Then if you have a picture inside the picturebox, it will be painted in, and then the label text will go over it (make the label's .BackStyle property transparent). That should give you the effect you're describing if I understood you correctly.
I'm baaaack...
VB5 Professional Edition, VC++ 6
Using a 1 gHz Thunderbird, 256 mb RAM, 40 gb HD system with Win98se
I feel special because I finally figured out how to loop midis: Post link
I'm a fanatic too 
-
Sep 14th, 2001, 11:09 AM
#6
Thread Starter
Junior Member
I got it working with labels - thanks a lot
Why did I ever start learning VB?! I should have been happy with Java. 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|