Results 1 to 4 of 4

Thread: Code to run on change of a property

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Mar 2003
    Posts
    68

    Code to run on change of a property

    I have a number of properties that hold configuration style information. I want to "refresh" a connection if any of these properties are changed. Do I have to add a call to my refresh code in each of the "Public Property Let" sections or is there someway to use the "PropertyChanged" method?

    Code:
    Public Property Let WriteQuePassword(ByVal New_WriteQuePassword As String)
        m_WriteQuePassword = New_WriteQuePassword
        PropertyChanged "WriteQuePassword"
     'DO I DO THIS? ->   Call MQSeriesRefresh
    End Property

  2. #2
    Frenzied Member yrwyddfa's Avatar
    Join Date
    Aug 2001
    Location
    England
    Posts
    1,253
    Welcome to the wonderful world of non-inheritance

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Mar 2003
    Posts
    68
    I take it that means do it for every one - what a pain!

    Why oh why isn't their a Property Changed event!

    I just don't see the point of the "PropertyChanged" Method because I only change the properties though the Property Page and that already knows the property has been changed, so the method becomes redundant. I think.

  4. #4
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    You'll need to call MQSeriesRefresh from every Property Let, if that is what you intend to do.

    PropertyChanged is used for when your component is in design time, so that the Properties Window will reflect the most current property values.
    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

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