Author Topic: Locker Panel  (Read 1361 times)

pedro.ma

  • Newbie
  • *
  • Posts: 3
    • View Profile
Locker Panel
« on: January 11, 2017, 12:25:33 PM »
Hi everyone, i'm kinda new in this of AdvancedHMI, im using the Locker Panel Control.

When I run the app, it's appear unlocked and I need that the panel being locked when we start the app. Do you have any idea of how I can do this?

I'm using version 399k.

Thank you very much.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5323
    • View Profile
    • AdvancedHMI
Re: Locker Panel
« Reply #1 on: January 11, 2017, 01:58:38 PM »
Godra may be able to offer a better answer, but my first attempt would be to set the Locked property to true in Design Mode.

Godra

  • Hero Member
  • *****
  • Posts: 1449
    • View Profile
Re: Locker Panel
« Reply #2 on: January 11, 2017, 06:00:51 PM »
Locked property is the original panel property and, when set True, would only prevent the control from being moved or resized.

One thing that seems to work is to use the MaiForm's Load event and put this code:

Code: [Select]
    Private Sub MainForm_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        Me.LockerPanel1.LP_ControlledLock = True
        Me.LockerPanel1.Value = True
        Me.LockerPanel1.LP_ControlledLock = False
    End Sub

This assumes that the LP_ControlledLock property was NOT already set to True in the DesignMode (if it was set then comment out or remove the first and the last line of code inside this sub).
« Last Edit: January 11, 2017, 06:04:04 PM by Godra »

pedro.ma

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Locker Panel
« Reply #3 on: March 22, 2017, 02:40:23 PM »
Thank you very much Archie and Godra, for different situation I had to stop developing that HMI but now I did what you told me and it works perfectly.