How to determine if a screen is active RRS feed

  • Question

  • Hi,

    I've got a screen that refreshes automatically every 5 minutes. I don't want the screen to refresh if it is not active.

    How do I determine if the screen is active so that it only refreshes when it's active?



    Tuesday, March 20, 2018 1:15 PM

All replies

  • Normally I'd point you to the events for the screen or other object to determine like refresh if the mouse is moving or refresh if a control is clicked like standard events stuff. The problem is back when I looked for the events in a tab or other places like you find in windows forms I found them to be absent and something I don't think was ever developed for LS. It's possible some of the third party LS software was capable of it but I don't have access to it. You should also know this is a pretty dead platform development has been abandoned and a lot of this platform relies on Silverlight which is over and will be abandoned completely in 2020. 
    Tuesday, April 17, 2018 3:35 AM
  • Hi, you can try this

    private static void VerifyScreenActive(IScreenObject screen)
                if (((IScreenDetailsImplementation)screen.Details).ScreenState == ScreenState.Closed)
                    throw new InvalidOperationException();

    Friday, January 18, 2019 9:07 PM