AdvancedHMI Software

General Category => Support Questions => Topic started by: scott.clark on October 16, 2015, 04:22:11 PM

Title: FormchangeButton Passcode property
Post by: scott.clark on October 16, 2015, 04:22:11 PM
How do you use the passcode property for the FormChangeButton control?
Title: Re: FormchangeButton Passcode property
Post by: Archie 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.
Title: Re: FormchangeButton Passcode property
Post by: scott.clark 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?
Title: Re: FormchangeButton Passcode property
Post by: Archie 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