将所有表单控件设置为null [英] Set all form controls to null

查看:85
本文介绍了将所有表单控件设置为null的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前我手动将表单上的每个控件设置为null以重置。有没有人知道如何使用循环或更简单的命令执行此操作?我见过一些制作换档控制阵列,但没有一个对我有用。


谢谢,

Aric

Currently I am manually setting each control on my form to null to reset. Does anyone know how to do this with a loop or a more simple command? I''ve seen some make shift control arrays but none that would work for me.

Thanks,
Aric

推荐答案


目前我手动将表单上的每个控件设置为null以重置。有没有人知道如何使用循环或更简单的命令执行此操作?我见过一些制作换档控制阵列,但没有一个适用于我。


谢谢,

Aric
Currently I am manually setting each control on my form to null to reset. Does anyone know how to do this with a loop or a more simple command? I''ve seen some make shift control arrays but none that would work for me.

Thanks,
Aric



尝试

Try

展开 | 选择 | Wrap | 行号


我试过类似的东西,但是我得到的错误是对象不支持该属性/方法。
I''ve tried something like that but I get the error that the object doesn''t support that property/method.


如果你仔细观察,你会看到包含的代码可以避免出现这种情况(On Error Resume Next)。 />
尽可能准确地尝试使用此代码并告诉我们你继续吧。

最糟糕的是你会浪费五分钟。

如果它对你不起作用,那就回来让我们知道发生了什么错了,我们会看看我们是否找不到另一种解决方案。
If you look carefully you''ll see that there is code included to avoid that situation arising (On Error Resume Next).
Try this code out as exactly as possible and let us know how you get on.
At worst you''ll waste five minutes.
If it doesn''t work properly for you then come back and let us know what went wrong and we''ll see if we can''t find another solution for you.


这篇关于将所有表单控件设置为null的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆