with语句的问题(在线等候在) 嵌套?对象要求还要有子集合比如listview1.listitem.item(i).subitem(2)="hello"每层用 . 区分 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 with me .top=1 .height=1 .width=1 .unloadend with'十分?有点太扣了吧 嵌套的 With 语句似乎没有什么意义。下面是MSDN中相关说明:可以将一个 With 块放在另一个之中,而产生嵌套的 With 语句。但是,由于外层 With 块成员会在内层的 With 块中被屏蔽住,所以必须在内层的 With 块中,使用完整的对象引用来指出在外层的 With 块中的对象成员。 With 语句示例本示例使用 With 语句对某单一对象执行一系列的语句。MyObject 对象及其属性均为示范目的而采用了通用名称。With MyObject .Height = 100 ' 和 MyObject.Height 一样等于 100 。 .Caption = "Hello World" ' 和 MyObject.Caption 一样等于 "Hello World" 。 With .Font .Color = Red ' 和 MyObject.Font.Color 一样等于 Red。 .Bold = True ' 和 MyObject.Font.Bold 一样等于 True 。 End WithEnd With With MyObject .Height = 100 ' 和 MyObject.Height 一样等于 100 。 .Caption = "Hello World" ' 和 MyObject.Caption 一样等于 "Hello World" 。 With .Font .Color = Red ' 和 MyObject.Font.Color 一样等于 Red。 .Bold = True ' 和 MyObject.Font.Bold 一样等于 True 。 End WithEnd With以上这样是可以,********但如果是两个不同的对象这样处理,我试了一下以下代码出错********With MyObject .Height = 100 ' 和 MyObject.Height 一样等于 100 。 .Caption = "Hello World" ' 和 MyObject.Caption 一样等于 "Hello World" 。 With otherobject.Color = Red ' 和 MyObject.Font.Color 一样等于 Red。 .Bold = True ' 和 MyObject.Font.Bold 一样等于 True 。 End WithEnd With 来混个脸熟,另求vb6开始的任何vb资料。 求一个2维数组相加的算法 怎么实现鼠标在界面上选中多个对象 有关toolbar控件和treeview控件的简单问题~~请帮忙 internet transfer控件和ftp文件的路径问题 如何调节自定义的鼠标指针的位置? 怎么实现多曲线图的拉伸,缩放,有什么好的控件推荐么? 一个关于SHELL的问题。 某一个字段在水晶报表上一行可显示多少字节 关于电子邮件 一个数据库导出后字段类型改变的问题 请高手们多多回答!!!谢谢拉
.top=1
.height=1
.width=1
.unload
end with
'十分?有点太扣了吧
本示例使用 With 语句对某单一对象执行一系列的语句。MyObject 对象及其属性均为示范目的而采用了通用名称。With MyObject
.Height = 100 ' 和 MyObject.Height 一样等于 100 。
.Caption = "Hello World" ' 和 MyObject.Caption 一样等于 "Hello World" 。
With .Font
.Color = Red ' 和 MyObject.Font.Color 一样等于 Red。
.Bold = True ' 和 MyObject.Font.Bold 一样等于 True 。
End With
End With
.Height = 100 ' 和 MyObject.Height 一样等于 100 。
.Caption = "Hello World" ' 和 MyObject.Caption 一样等于 "Hello World" 。
With .Font
.Color = Red ' 和 MyObject.Font.Color 一样等于 Red。
.Bold = True ' 和 MyObject.Font.Bold 一样等于 True 。
End With
End With
以上这样是可以,
********但如果是两个不同的对象这样处理,我试了一下以下代码出错********With MyObject
.Height = 100 ' 和 MyObject.Height 一样等于 100 。
.Caption = "Hello World" ' 和 MyObject.Caption 一样等于 "Hello World" 。
With otherobject
.Color = Red ' 和 MyObject.Font.Color 一样等于 Red。
.Bold = True ' 和 MyObject.Font.Bold 一样等于 True 。
End With
End With