请教如何在程序中设置控件的Z轴顺序。
请教如何在程序中设置控件的Z轴顺序。
[解决办法]
WinForm吗?
控件在ControlCollection中的索引就代表了它的Z轴顺序,索引小的靠前。
可以使用ControlCollection的SetChildIndex函数改变索引:
Me.Controls.SetChildeIndex(ctr,2)
参考:http://msdn.microsoft.com/zh-cn/library/system.windows.forms.control.controlcollection.setchildindex.aspx