Const m_def_IsDropedDown = 0 Dim m_IsDropedDown As Variant 'Déclarations d'événements: Event Change() Event Validate(Cancel As Boolean) Event KeyDown(KeyCode As Integer, Shift As Integer) Event KeyPress(KeyAscii As Integer) Event KeyUp(KeyCode As Integer, Shift As Integer) Public Sub Refresh() ADOKeyboard.Refresh End Sub Public Property Get ConnectionString() As String ConnectionString = ADOKeyboard.ConnectionString End Property Public Property Let ConnectionString(ByVal New_ConnectionString As String) ADOKeyboard.ConnectionString() = New_ConnectionString PropertyChanged "ConnectionString" End Property Public Property Get RecordSource() As String RecordSource = ADOKeyboard.RecordSource End Property Public Property Let RecordSource(ByVal New_RecordSource As String) ADOKeyboard.RecordSource() = New_RecordSource PropertyChanged "RecordSource" End Property Public Property Get RowSource() As Adodc Set RowSource = DtcKeyboard.RowSource End Property Public Property Set RowSource(ByRef New_RowSource As Adodc) Set DtcKeyboard.RowSource = New_RowSource PropertyChanged "RowSource" End Property Public Sub ReFill() DtcKeyboard.ReFill End Sub Public Property Get SelectedItem() As Variant SelectedItem = DtcKeyboard.SelectedItem End Property Public Property Get Recordset() As Recordset Set Recordset = ADOKeyboard.Recordset End Property Public Property Set Recordset(ByVal New_Recordset As Recordset) Set ADOKeyboard.Recordset = New_Recordset PropertyChanged "Recordset" End Property Public Property Get IsDropedDown() As Variant IsDropedDown = m_IsDropedDown End Property Public Property Let IsDropedDown(ByVal New_IsDropedDown As Variant) m_IsDropedDown = New_IsDropedDown PropertyChanged "IsDropedDown" End Property Private Sub UserControl_InitProperties() m_IsDropedDown = m_def_IsDropedDown End Sub Private Sub UserControl_ReadProperties(PropBag As PropertyBag) DtcKeyboard.BoundColumn = PropBag.ReadProperty("BoundColumn", "") DtcKeyboard.BoundText = PropBag.ReadProperty("BoundText", "") ADOKeyboard.ConnectionString = PropBag.ReadProperty("ConnectionString", "") ADOKeyboard.RecordSource = PropBag.ReadProperty("RecordSource", "") Set RowSource = PropBag.ReadProperty("RowSource", ADOKeyboard) DtcKeyboard.ListField = PropBag.ReadProperty("ListField", "") DtcKeyboard.Enabled = PropBag.ReadProperty("Enabled", True) m_IsDropedDown = PropBag.ReadProperty("IsDropedDown", m_def_IsDropedDown) DtcKeyboard.Text = PropBag.ReadProperty("Text", "") DtcKeyboard.ToolTipText = PropBag.ReadProperty("ToolTipText", "") Set Recordset = PropBag.ReadProperty("Recordset", ADOKeyboard.Recordset) End Sub 'Écrire les valeurs des propriétés dans le stockage Private Sub UserControl_WriteProperties(PropBag As PropertyBag) Call PropBag.WriteProperty("BoundColumn", DtcKeyboard.BoundColumn, "") Call PropBag.WriteProperty("BoundText", DtcKeyboard.BoundText, "") Call PropBag.WriteProperty("ConnectionString", ADOKeyboard.ConnectionString, "") Call PropBag.WriteProperty("RecordSource", ADOKeyboard.RecordSource, "") Call PropBag.WriteProperty("RowSource", RowSource, ADOKeyboard) Call PropBag.WriteProperty("ListField", DtcKeyboard.ListField, "") Call PropBag.WriteProperty("Enabled", DtcKeyboard.Enabled, True) Call PropBag.WriteProperty("IsDropedDown", m_IsDropedDown, m_def_IsDropedDown) Call PropBag.WriteProperty("Text", DtcKeyboard.Text, "") Call PropBag.WriteProperty("ToolTipText", DtcKeyboard.ToolTipText, "") Call PropBag.WriteProperty("Recordset", Recordset, ADOKeyboard.Recordset) End Sub
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question