读书人

请问怎么在程序中设置控件的Z轴顺序

发布时间: 2012-05-21 18:04:41 作者: rapoo

请教如何在程序中设置控件的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

读书人网 >VB Dotnet

热点推荐