千千

IT博客 首页 新随笔 联系 管理
  16 Posts :: 24 Stories :: 5 Comments :: 0 Trackbacks

用来简化某个多次重复出现的对象名
例如在Form2中调用Form1的对象:
Form1.text1.text="XXX"
Form1.text2.text="XXXXX"
Form1.text3.text="XXXX"
就可以写成
With Form1
.text1.text="XXX"
.text2.text="XXXXX"
.text3.text="XXXX"
end With

-------------------------------------------------------
例如:
with text1
.text="你好"
.multiline=true
.locked=true
.maxlength=10
end with

这个就相当于
text1.text="你好"
text1.multiline=true
text1.locked=true
text1.maxlength=10

posted on 2007-01-21 17:40 千千 阅读(242) 评论(0)  编辑 收藏 引用 所属分类: VB
只有注册用户登录后才能发表评论。