读书人

求救好心人!自定义按钮控件的DataBin

发布时间: 2011-12-28 22:45:21 作者: rapoo

求救好心人!自定义按钮控件的DataBindings属性怎么添加上去?
我想在VB6.0中的一个自定义按钮控件上添加一个DataBindings属性,不知它应该是什么类型的属性,怎么写它
Public Property Get DataBindings() As DataBindings
Set DataBindings = cmdObject.DataBindings
End Property

Public Property Set DataBindings(ByVal NewValue As DataBindings)
** Set cmdObject.DataBindings = NewValue
PropertyChanged "DataBindings "
End Property

Private Sub UserControl_ReadProperties(PropBag As PropertyBag)
Set cmdObject.DataBindings = PropBag.ReadProperty( "DataBindings ")
End Sub

Private Sub UserControl_WriteProperties(PropBag As PropertyBag)
Call PropBag.WriteProperty( "DataBindings ", cmdObject.DataBindings)
End Sub
以上代码“**”处会报错,为什么?

[解决办法]
cmdObject是什么

读书人网 >VB

热点推荐