Keeping a label on top of a form 
Author Message
 Keeping a label on top of a form

Is it possible to keep a label on top of a form instead
of it living on the middle layer ?

I want to place a label on a graph control that i'm
using - but of course the graph control always blanks out
the label no matter what you do with ZOrder

If not, does anyone know of another control that will
allow me to have the functionality of a label (i.e. show
some text without the user being able to select it) ?

I've tried a text box with Locked set to true, but that
can still get focus, which is not what i want.

Thanks everyone

Andy



Sun, 18 Dec 2005 07:19:26 GMT  
 Keeping a label on top of a form

<cut>

Quote:
> If not, does anyone know of another control that will
> allow me to have the functionality of a label (i.e. show
> some text without the user being able to select it) ?

how about using a picturebox or frame control?  You can set the ZOrder for
that and then place your label on it.


Sun, 18 Dec 2005 07:30:32 GMT  
 Keeping a label on top of a form
Don't know if this will work, but you can right click on the label and Bring
to Front and then right click on the chart Send to Back. And if that don't
work, set visibility to nil for each control then make the chart visible
first then make the label visible.

Only offering stuff off the top of my head. Let us know if that works.

--
Jim Carlock
http://www.microcosmotalk.com
Feel free to post back to the newsgroup for all to witness!



Sun, 18 Dec 2005 07:34:08 GMT  
 Keeping a label on top of a form
Thanks for your thoughts Jim....

However, I'm falling fowl of this extract from the MSDN
for VB6

'Three graphical layers are associated with forms
andcontainers. 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.'

No matter what i do with Bring to Front etc. the label
control stays on the middle layer.

I'm hoping someone knows a way round this !

Andy

Quote:
>-----Original Message-----
>Don't know if this will work, but you can right click on
the label and Bring
>to Front and then right click on the chart Send to Back.
And if that don't
>work, set visibility to nil for each control then make
the chart visible
>first then make the label visible.

>Only offering stuff off the top of my head. Let us know
if that works.

>--
>Jim Carlock
>http://www.microcosmotalk.com
>Feel free to post back to the newsgroup for all to
witness!

>.



Sun, 18 Dec 2005 08:21:03 GMT  
 Keeping a label on top of a form


Quote:
> Don't know if this will work, but you can right click on the label and
Bring
> to Front and then right click on the chart Send to Back. And if that don't
> work, set visibility to nil for each control then make the chart visible
> first then make the label visible.

> Only offering stuff off the top of my head. Let us know if that works.

Labels are "windowless" controls and cannot appear on top of windowed
controls (like the graph) unless they are contained within another windowed
control.


Sun, 18 Dec 2005 12:02:04 GMT  
 Keeping a label on top of a form
"Jeff Johnson [MVP: VB]" wrote...

Quote:

> Labels are "windowless" controls and cannot appear on top of windowed
> controls (like the graph) unless they are contained within another
windowed
> control.

Things seem to fall into place when explained appropriately! Good thing to
know. Thanks!

--
Jim Carlock
http://www.microcosmotalk.com
Feel free to post back to the newsgroup for all to witness!



Sun, 18 Dec 2005 13:19:52 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. How do I keep My form on top?

2. Keeping a Form Always On Top

3. Keeping forms on top?

4. How to keep a form on top - newbie question

5. Keeping form on top..

6. Keep child form on top (non-modal)

7. How to keep an inactive form on top???

8. Keep child form on top (non-modal)

9. Keeping a form on top

10. Keeping a form on top

11. Keep form on top of only my application

12. keeping a form on top problem

 

 
Powered by phpBB® Forum Software