مشكل احتمالا تو گت كردن هست
نمونه زير نگاه كنيد
Dim m_Text As String
Event Change()
Private Sub Text1_Change()
m_Text = Text1.Text
RaiseEvent Change
End Sub
Private Sub GetProperty()
Text1.Text = m_Text
End Sub
Private Sub SetProperty()
Text1.Text = m_Text
End Sub
Private Sub UserControl_InitProperties()
m_Text = "" 'Base Data
End Sub
Private Sub UserControl_ReadProperties(PropBag As PropertyBag)
m_Text = PropBag.ReadProperty("Text", "")
Call GetProperty ' Or => m_Text = Text1.Text
End Sub
Private Sub UserControl_Resize()
Width = Text1.Width
Height = Text1.Height
End Sub
Public Property Get Text() As String
Text = m_Text
End Property
Public Property Let Text(ByVal vNewValue As String)
m_Text = vNewValue
Call SetProperty
PropertyChanged "Text"
End Property
Private Sub UserControl_WriteProperties(PropBag As PropertyBag)
Call PropBag.WriteProperty("Text", m_Text, "")
End Sub