|
|
Title | Move a control to the front or the back of the stacking order at run time in Visual Basic 6 |
Description | This example shows how to move a control to the front or the back of the stacking order at run time in Visual Basic 6. |
Keywords | stacking order, zorder, z-order, Visual Basic 6, VB 6 |
Categories | Controls |
|
|
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.)
|
|
|
|
|
|