Author Topic: Method for requiring Password to Exit the Application  (Read 947 times)

scott.clark

  • Jr. Member
  • **
  • Posts: 96
    • View Profile
Method for requiring Password to Exit the Application
« on: November 11, 2015, 10:16:26 AM »
Advanced HMI v3.99a

Any suggestions on how I can require the operator to enter a numeric password to exit the AdvancedHMI application? 

Also, how can I prevent them from dragging the form?  Ultimately, I am wanting to prevent them from getting to the PC.

Thanks,
Scott

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5262
    • View Profile
    • AdvancedHMI
Re: Method for requiring Password to Exit the Application
« Reply #1 on: November 11, 2015, 06:04:32 PM »
    Private Sub MainForm_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing
        Dim kpd As New MfgControl.AdvancedHMI.Controls.Keypad
        kpd.ShowDialog()
        If kpd.Value <> "1234" Then
            e.Cancel = True
        End If
    End Sub