I have a mostly functioning Visual Studio C# plugin for for an HMI. It has some buttons on-screen that need to function as momentary pushbutton. I can make it toggle as two separate buttons, but I need: a button that does both... triggers bool on click, On mouse release, it makes the bool false. The problem is that all way of doing this that I have tried, start to work, miss a click occasionally then will suddenly shut down the "parent" application with no warning or error. IF BIDDING HOURLY PLEASE ESTIMATE TIME.
UPDATED DETAILS: Toggle buttons are now in the C# code, but still crashing main application. This HMI connects to a PLC using PLCi in C#. Knowledge of PLC connections with C# and Ladder are required, though you do not need to program the ladder. This appears to be a communications, loop, or scan time issue. Bools triggered are PLC global variables, so scan time may be a consideration. Can debug in real time.