Results 1 to 2 of 2

Thread: ugent help

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Mar 2001
    Location
    Springfield
    Posts
    120
    Can someone explain why the code below does not work. I create a user control and type something in the datafield at property window. But it will disappear after I run the app. Can somebody help? Thanks very much

    private m_DataField as string
    Public Property Let DataField(vDatafield As String)
    m_DataField = vDatafield
    PropertyChanged "DataField"
    End Property
    Public Property Get DataField() As String
    DataField = m_DataField
    End Property
    Private Sub UserControl_ReadProperties(PropBag As PropertyBag)
    fpblnYes.DataField = PropBag.ReadProperty("DataField", DataField)
    End Sub

    Private Sub UserControl_WriteProperties(PropBag As PropertyBag)
    Call PropBag.WriteProperty("DataField", m_DataField, DataField)
    End Sub
    MM

  2. #2
    New Member
    Join Date
    May 2001
    Posts
    15
    If you are trying to make an object persist...
    I think you are missing a couple of steps....

    You have to create the Property Bag object and write the object to the
    Property Bag... then those events will get trigered.

    After that, the client application must write the contents of the
    Property Bag to a file... thats the write processes ... the read process is similar but backwards.

    Go to MSDN online and lookup the... "Property Bag" Object... look at its Content property...

    The code you've provided is incomplete

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width