本文介绍了按顺序通过控制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在创建一个包含表单文本字段的 XML 文件.当我使用 For Each
循环遍历它们时:
I'm creating an XML file with the text fields of a form. When I go through them using a For Each
loop:
For each Ctrl in Me.Controls
'dosomething
Next
它没有按顺序排列;也就是说,它首先将 TextBox
放在中间,然后是第一个,然后是另一个,然后一直这样.
it doesn't take them in order; that is, it first takes the TextBox
in the middle, then the first one, then another and it keeps going that way.
有没有办法按顺序取值?
Is there a way where I can take the values in order?
推荐答案
Me.Controls
包含控件的创建顺序.
Me.Controls
contains the controls in the order they were created.
要更改它,请选择第一个控件(在设计器中),单击置于底层",然后重复.
To change that, select the first control (in the designer), click Send to Back, and repeat.
这篇关于按顺序通过控制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!