做个函数咯 public sub SetLabel(lbl as Label) set label1 = lbl end sub
//但label1不是一个对象 我应该怎么做实例化
private labelcl as Label '这儿又用不了NEW private withevents Label1 as LabelPrivate Sub Class_Initialize() set withevents=labelcl end subpublic property let Caption(Data as string) label1.caption=data end property public property get Caption()as string caption=label1.caption end property 当设置和读取属性时出错,该怎么办
public sub SetLabel(lbl as Label)
set label1 = lbl
end sub
我应该怎么做实例化
private withevents Label1 as LabelPrivate Sub Class_Initialize()
set withevents=labelcl
end subpublic property let Caption(Data as string)
label1.caption=data
end property
public property get Caption()as string
caption=label1.caption
end property
当设置和读取属性时出错,该怎么办