It still seems to be memorizing all previous attempts.
If disposed of and then re-created it will not memorize any:
Private Sub KeypadPopUp_ButtonClick(ByVal sender As Object, ByVal e As MfgControl.AdvancedHMI.Controls.KeyPadEventArgs)
If e.Key = "Enter" OrElse e.Key = "Quit" Then
If e.Key = "Enter" Then
If m_ComComponent Is Nothing Then
DisplayError("ComComponent Property not set")
Else
If KeypadPopUp.Value IsNot Nothing AndAlso (String.Compare(KeypadPopUp.Value, "") <> 0) Then
Dim response As DialogResult = MessageBox.Show("Are you sure " & KeypadPopUp.Value & " is correct?", "Validate Change", MessageBoxButtons.YesNo)
If response = DialogResult.Yes Then
Try
If m_KeypadMaxValue <> m_KeypadMinValue Then
If KeypadPopUp.Value < m_KeypadMinValue Or KeypadPopUp.Value > m_KeypadMaxValue Then
System.Windows.Forms.MessageBox.Show("Value must be >" & m_KeypadMinValue & " and <" & m_KeypadMaxValue)
Exit Sub
End If
End If
Catch ex As Exception
System.Windows.Forms.MessageBox.Show("Failed to validate value. " & ex.Message)
Exit Sub
End Try
Try
If KeypadScaleFactor = 1 Or KeypadScaleFactor = 0 Then
m_ComComponent.Write(m_PLCAddressKeypad, KeypadPopUp.Value)
Else
m_ComComponent.Write(m_PLCAddressKeypad, CDbl(KeypadPopUp.Value) / m_KeypadScaleFactor)
End If
Catch ex As Exception
System.Windows.Forms.MessageBox.Show("Failed to write value. " & ex.Message)
End Try
Else
Exit Sub
End If
End If
End If
End If
KeypadPopUp.Visible = False
KeypadPopUp.Dispose()
KeypadPopUp = New MfgControl.AdvancedHMI.Controls.Keypad(m_KeypadWidth)
End If
End Sub