Is there an easy way to programmatically get the end time of the display? We want to show it in the top of our displays. The solution we have found is ugly but it works...
We have a hidden trend on every display to guarantee the users can scroll time. In the trend's OnChangeTimeRange (or whatever it's called) event, we grab the end time and display it in a text symbol. Trouble is, most of the time the end time is Current Time and we need the displayed time to show that, updating every few seconds.
So in the display's OnDataUpdate() handler, we get the trend's current time settings (eg *-1d and *) and pass them back into it's SetStartAndEndtime() method. This then triggers the OnChangeTimeRange handler so we can grab the end time and update the text symbol. This seems to work but, as I say, it is ugly! For one thing, I believe it may make the trend go back to PI for its historical data so we will have to ensure it looks at a quiet tag like Sinuisoid.
In case it makes any difference, this must also work in ActiveView.