Results 1 to 3 of 3

Thread: How can I change the stack order(Z order) of a usercontrol??

  1. #1

    Thread Starter
    Hyperactive Member toughcoder's Avatar
    Join Date
    Nov 2002
    Location
    Near, Very Near
    Posts
    340

    Question How can I change the stack order(Z order) of a usercontrol??

    Greetings fellow programmers, I have got a doubt i hope some1 will clear for me.
    Well coming to the point, I have a usercontrol, which once placed on a form should automatically be stacked below all the other controls. To be more clear, if i have got a command button added to my form, and then i add my usercontrol, definitely my control will overlap the command button. I want it the opposite way, i want the command button to be stacked on top of the control. Can any1 help???? A tough nut i guess???
    If Not VB Then Exit
    ------------------------------------------------
    visit me @ http://mzubair.50g.com/

  2. #2
    Frenzied Member Rick Bull's Avatar
    Join Date
    Apr 2002
    Location
    England
    Posts
    1,444
    I think it's the same as I answered in your other thread:

    VB Code:
    1. Private Sub UserControl_Show()
    2.     Call UserControl.Extender.ZOrder(vbSendToBack)
    3. End Sub

    I think you have to do it once the control is visible though.

  3. #3

    Thread Starter
    Hyperactive Member toughcoder's Avatar
    Join Date
    Nov 2002
    Location
    Near, Very Near
    Posts
    340

    thanx rick bull

    thanx Rick Bull for the usercontrol move and z-order code. Both of them worked perfectly. I have learned quite a few things on usercontrols from u. Thanx once again friend.
    If Not VB Then Exit
    ------------------------------------------------
    visit me @ http://mzubair.50g.com/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width