Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
C# Helper...
 
XML RSS Feed
Follow VBHelper on Twitter
 
 
 
MSDN Visual Basic Community
 
 
 
 
 
TitleMove a control to the front or the back of the stacking order at run time in Visual Basic 6
DescriptionThis example shows how to move a control to the front or the back of the stacking order at run time in Visual Basic 6.
Keywordsstacking order, zorder, z-order, Visual Basic 6, VB 6
CategoriesControls
 
A control's ZOrder method can move the control to the back or front of the stacking order. Pass the method one of the parameters vbBringToFront or vbSendToBack to determine whether the control moves to the top of bottom.
 
Private Sub cmdToTop1_Click()
    cmdToTop1.ZOrder 0
End Sub

Private Sub cmdToTop2_Click()
    cmdToTop2.ZOrder 0
End Sub

Private Sub cmdToBottom1_Click()
    cmdToBottom1.ZOrder 1
End Sub

Private Sub cmdToBottom2_Click()
    cmdToBottom2.ZOrder 1
End Sub
 
Unfortunately I don't know of an easy way to move a control to a particular position in the stacking order. (For example, second-to-bottom.)
 
 
Copyright © 1997-2010 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated