首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > VB Dotnet >

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

2012-05-21 
请教如何在程序中设置控件的Z轴顺序。请教如何在程序中设置控件的Z轴顺序。[解决办法]WinForm吗?控件在Contr

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

热点排行