AdvancedHMI Software
General Category => Support Questions => Topic started by: Phrog30 on April 21, 2017, 08:52:47 PM
-
If I have a form with more than one com component, is there a way to stop one on hidden, but not the other?
James
-
I tried:
AdvancedHMIDrivers.Utilities.StopComsOnHidden(PLC_1, Me)
but this didn't work.
I ended up with this:
PLC_1.DisableSubscriptions = Not Me.Visible
'PLC_2.DisableSubscriptions = Not Me.Visible 'Don't disable this one
this worked ok. If there is a better way please let me know.
-
Your solution is what I was about to recommend. The default code snippet is generic code that looks for all drivers and disables their subscriptions. By replacing that code with the code you have, it makes it more specific to the drivers in your application. If you add more driver instances, you will just have to remember to add them to the code if you want them to stop on hidden.