002366台海核电股吧:会VB。NET的高手来看一下我的问题,谢谢

来源:百度文库 编辑:高校问答 时间:2024/05/04 08:42:09
请问一下大家,在VB。NET中,如果我要用for each ..next 语句遍历 button1……button25 个命令按钮,应该怎么写?

for each varb in me.controls
if varb is me.button1 then .......
if varb is me.button2 then .......
........
next
试一下吧

不用写代码,在设计界面中就有安排按钮顺序的功能。