Author Topic: FormchangeButton Passcode property  (Read 1380 times)

scott.clark

  • Jr. Member
  • **
  • Posts: 96
    • View Profile
FormchangeButton Passcode property
« on: October 16, 2015, 04:22:11 PM »
How do you use the passcode property for the FormChangeButton control?

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: FormchangeButton Passcode property
« Reply #1 on: October 16, 2015, 04:32:54 PM »
You just put in a value such as 1234 and when the FormChangeButton is clicked, it will pop up a keypad asking for that value before opening the target form.

scott.clark

  • Jr. Member
  • **
  • Posts: 96
    • View Profile
Re: FormchangeButton Passcode property
« Reply #2 on: October 16, 2015, 06:43:04 PM »
Is there a way to put a variable in that location so that it could be changed by the end user without recompiling?

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: FormchangeButton Passcode property
« Reply #3 on: October 16, 2015, 07:04:04 PM »
Edit FormChangeButton.vb and add this code:

    '*****************************************
    '* Property - Address in PLC to Link to
    '*****************************************
    Private m_PLCAddressPasscode As String = ""
    <System.ComponentModel.Category("PLC Properties")> _
    Public Property PLCAddressPasscode() As String
        Get
            Return m_PLCAddressPasscode
        End Get
        Set(ByVal value As String)
            If m_PLCAddressPasscode <> value Then
                m_PLCAddressPasscode = value

                '* When address is changed, re-subscribe to new address
                SubscribeToCommDriver()
            End If
        End Set
    End Property