我想在VB6.0中的一个自定义按钮控件上添加一个DataBindings属性,不知它应该是什么类型的属性,怎么写它
Public Property Get DataBindings() As DataBindings
Set DataBindings = cmdObject.DataBindings
End PropertyPublic Property Set DataBindings(ByVal NewValue As DataBindings)
** Set cmdObject.DataBindings = NewValue
PropertyChanged "DataBindings"
End PropertyPrivate Sub UserControl_ReadProperties(PropBag As PropertyBag)
Set cmdObject.DataBindings = PropBag.ReadProperty("DataBindings")
End SubPrivate Sub UserControl_WriteProperties(PropBag As PropertyBag)
Call PropBag.WriteProperty("DataBindings", cmdObject.DataBindings)
End Sub
以上代码“**”处会报错,为什么?
Public Property Get DataBindings() As DataBindings
Set DataBindings = cmdObject.DataBindings
End PropertyPublic Property Set DataBindings(ByVal NewValue As DataBindings)
** Set cmdObject.DataBindings = NewValue
PropertyChanged "DataBindings"
End PropertyPrivate Sub UserControl_ReadProperties(PropBag As PropertyBag)
Set cmdObject.DataBindings = PropBag.ReadProperty("DataBindings")
End SubPrivate Sub UserControl_WriteProperties(PropBag As PropertyBag)
Call PropBag.WriteProperty("DataBindings", cmdObject.DataBindings)
End Sub
以上代码“**”处会报错,为什么?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货