请大家帮我看看出错的原因吧?
我正在写一个ActiveX控件,我写了如下的属性:
--------------------------------------------------------------------
dim m_NormalImageList as Object
Public Property Get NormalImageList() As Object
Set NormalImageList = m_NormalImageList
End Property
Public Property Set NormalImageList(ByVal New_NormalImageList As Object)
Set m_NormalImageList = New_NormalImageList
PropertyChanged "NormalImageList"
End Property
--------------------------------------------------------------------
为了在从设计模式切换到运行模式时保持属性的值,我写了如下事件代码:
--------------------------------------------------------------------
Private Sub UserControl_WriteProperties(PropBag As PropertyBag)
Call PropBag.WriteProperty("NormalImageList", m_NormalImageList, Nothing)
End Sub
Private Sub UserControl_ReadProperties(PropBag As PropertyBag)
Set m_NormalImageList = PropBag.ReadProperty("NormalImageList", Nothing)
End Sub
--------------------------------------------------------------------
我觉得一切都合理,可是在我调试的时候,这一句:
Call PropBag.WriteProperty("NormalImageList", m_NormalImageList, Nothing)
出现了错误:非法的参数。
很郁闷啊,请会这个的朋友指导我一下吧。