VB中with语句的使用问题

2025-05-07 21:27:03
推荐回答(3个)
回答(1):

dim tempSize as double ' 先定义一个变量
with a
.name="124"
.width=100
tempSize = .size '?你要的是不是这个对象?
with .size
.x=tempSize *0.01
.y=a.tempSize *0.02
end with
end with

回答(2):

把第一个end with提前到第二个with语句前面。

回答(3):

with a
.name="124"
.width=100
with size
.x=a.name*0.01
.y=a.width*0.02
end with
end with