Home » Category » Microsoft Visual Basic

Microsoft Visual Basic: zorder of user control

104| Wed, 05 Dec 2007 11:28:00 GMT| ishrar| Comments (6)
Hello...
Is it possible to bring lable on front of user control.
I am using zorder 0 of label to bring it to front but it does not seem upside of user control
is ther any api to do so?

Keywords & Tags: zorder, user, control, microsoft, visual basic, vb

URL: http://www.programmerbase.com/visual-basic/560845/
 
«« Prev - Next »» 6 helpful answers below.
No, a Label control (like an Image control) is a lightweight control - it cannot be in front of other controls that aren't lightweight (unless the other control is a container, and the lightweight control is placed inside it).

Try using a TextBox instead, with properties such as Enabled and Locked set as appropriate.

si_the_geek | Mon, 03 Dec 2007 14:32:00 GMT |

so can we use any api to bring the lable in front of user control.

ishrar | Mon, 03 Dec 2007 14:33:00 GMT |

Nope. Are you using transparency or why using a textbox or label in a picturebox doesn't work for you?

merri | Mon, 03 Dec 2007 14:34:00 GMT |

yes actually i hav used one shape inside user contorol, because i couldnt drag simple shape at runtime.
if the back style of shape in usercontrol is 0 then ther is no problem, but if it is opaque then lable outside of usercontrol is hidden behind user control.
and i cant take tht lable in front of user contorol by using zorder method...
so if ther is any api then tell else giv me alternate way to use anything instead of usercontrol to move shape at runtime..
thnx....

ishrar | Mon, 03 Dec 2007 14:35:00 GMT |

As Merri said, there is no API that will help.

We have given you two alternative methods - replace the label with a textbox, or put the label into a picturebox.

si_the_geek | Mon, 03 Dec 2007 14:36:00 GMT |

ohhh no!!!!!!!!!!!!!!!!
but i want my label transparent......
i can do compromis wid shap but label must be transperent

any one please do something

ishrar | Mon, 03 Dec 2007 14:37:00 GMT |

Microsoft Visual Basic Hot Answers

Microsoft Visual Basic New questions

Microsoft Visual Basic Related Categories