Reputation: 17
I am trying to move a panel forward when I MouseDown, currently I am doing this using
panel.BringToFront()
Then when I MouseUp I want to send the panel back, i am trying to do this using
panel.SendToBack()
When i run, it moves the panel forward, but doesnt send it backwards again. Are there other ways to manipulate a control in the Z-axis other than using BringToFront or SendToBack.
I am using VB Express 2008.
Upvotes: 0
Views: 2399
Reputation: 1426
Yes try:
Me.panel.Parent.Controls.SetChildIndex(me.panel, zIndex) 'Put instead of zIndex the Zorder number that you want
Upvotes: 1