Control.ControlCollection.SetChildIndex(Control, Int32) 方法     
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
将集合中的指定子控件的索引设置为指定的索引值。
public:
 void SetChildIndex(System::Windows::Forms::Control ^ child, int newIndex);
	public:
 virtual void SetChildIndex(System::Windows::Forms::Control ^ child, int newIndex);
	public void SetChildIndex (System.Windows.Forms.Control child, int newIndex);
	public virtual void SetChildIndex (System.Windows.Forms.Control child, int newIndex);
	member this.SetChildIndex : System.Windows.Forms.Control * int -> unit
	abstract member SetChildIndex : System.Windows.Forms.Control * int -> unit
override this.SetChildIndex : System.Windows.Forms.Control * int -> unit
	Public Sub SetChildIndex (child As Control, newIndex As Integer)
	Public Overridable Sub SetChildIndex (child As Control, newIndex As Integer)
	参数
- child
 - Control
 
要搜索的 child 控件。
- newIndex
 - Int32
 
控件的新索引值。
例外
child 控件不在 Control.ControlCollection 中。
注解
调用时SetChildIndex,参数引用child的引用将移动到指定newIndex的位置,并将重新排序中的Control.ControlCollection其他Control引用以适应移动。Control 索引值为零的控件位于 z 顺序的顶部,数字越接近底部。