-
How do I make a Control get ontop of the other controlls at runtime?
For example I want a frame I have made to go ontop of a text box when a user push a button.
I have tried the folowing without any luck.
Code:
fraMenu.Visible = True
-
fraMenu.Enabled = True
Thanks.
-Lumin
-
Use zOrder to set the position of a control at runtime ie.
FraMenu.zOrder = 0 '0 = top of other controls
FraMenu.zOrder = 1 '1 = bottom of other controls
Hope this helps
Jeremy
-
Got some problems...
Thanks. It realy looked like it could work.. but somehow I get an error while using it.
Error message: "Expected function or variable"
anyone know why ?
here is the code that I use the function in
Code:
Select Case txtChatSend.Text
Case "?Connect", "?connect":
fraConnect.ZOrder = 0
txtChatSend.Text = ""
Exit Sub
Case "?Help", "?help":
rtfChatDisplay.Text = rtfChatDisplay.Text & "help is on its way..."
rtfChatDisplay.SelStart = Len(rtfChatDisplay.Text)
txtChatSend.Text = ""
Exit Sub
Case "?Clear", "?clear":
rtfChatDisplay.Text = ""
rtfChatDisplay.SelStart = Len(rtfChatDisplay.Text)
txtChatSend.Text = ""
Exit Sub
End Select
is there any problem using ZOrder in a case function?
Thanks.
-Lumin
-
Sorry about that it was a mistake on my part I use the = and you cant on Zorder, try
FraMenu.Zorder 0 'Control ontop
FraMenu.Zorder 1 'Control On Bottom
This should work for you,
Jeremy
-
Thanks!!
Thanks a lot, it realy worked :)
I feel a little dumb that I didn't try that myself :)
Anyway Thanks a lot for the help.
-Lumin
-
Another way!
When I need make controls appears and desappears I create groups of controls in a picuteBox and when I wish make visible/unvisible I just set the visible property of the PictureBox!
Jefferson