这样: 在project->refrence中添加Microsoft Scripting Runtime 然后新建一个class,名字就叫你的这个类型,fi dim dctTemp as new dictionary dim MyFi as new fiMyFi.controlname=... MyFi.Isempty=.... ..... dctTemp.add key,MyFi 以后,引用时用:dctTemp(key).controlname dctTemp(key).IsEmpty即可
我写的class是要给脚本调用的,怎样才能屏蔽掉,dictionary的其它方法,属性啊!比如Add等! Public Form As New Dictionary Public Files As New Dictionary 然后 MyFi.controlname=... MyFi.Isempty=.... ..... dctTemp.add key,MyFi
这样的:产生一个activex dll项目,添加"scripting runtime"然后, private mdctTemp as new dictionarypublic property get Count() as long count=mdcttemp.count end propertypublic property get item(byval Index as variant) as your class name item=mdcttemp.items(index) end property 然后,把item属性设为该类的default 属性。以后使用时,就可以用MyClass(Index)相当于Myclass.Item(Index)
在project->refrence中添加Microsoft Scripting Runtime
然后新建一个class,名字就叫你的这个类型,fi
dim dctTemp as new dictionary
dim MyFi as new fiMyFi.controlname=...
MyFi.Isempty=....
.....
dctTemp.add key,MyFi
以后,引用时用:dctTemp(key).controlname
dctTemp(key).IsEmpty即可
Public Form As New Dictionary
Public Files As New Dictionary
然后
MyFi.controlname=...
MyFi.Isempty=....
.....
dctTemp.add key,MyFi
你的意思我不大明白。
你的意思是说,你要做个class,在asp中给scipt调用,而不想暴露不该暴露的方法,是吗?
那你的class用甚么方式表现呢?activex exe,activex ocx,还是...?
你等等,我要查一下枚举算子如何用的。
private mdctTemp as new dictionarypublic property get Count() as long
count=mdcttemp.count
end propertypublic property get item(byval Index as variant) as your class name
item=mdcttemp.items(index)
end property
然后,把item属性设为该类的default 属性。以后使用时,就可以用MyClass(Index)相当于Myclass.Item(Index)
private xxx as new form
是这样吗?
不好意思,我晚上来不了了.明天见.