Group: StrataFrame MVPs
Posts: 1.9K,
Visits: 21K
|
Hi Larry and Edhy.
I have the exact same situation on my application, showing a listview that is refreshed based on a timer. The only difference, I think, is that I use a BackgroundWorker to process and interact with the form when the timer triggers. I also don't use the time span you do, mine refreshes automatically every 5 minutes if on a Local connection and every 10 minutes if connected through Enterprise Server. Even on longer intervals like mine, I also make sure that if the Timer triggers while the last trigger is still being processed, I won't let it go through and just exit it right on the first line of its Elapsed Event.
On my MainForm I have 14 Timers going on, all of them managed this way. I also have some that will trigger on shorter intervals, like one that will run every 10 seconds, which is used to "talk" to my Server module through TCP Sockets. I still don't get the exception you are experiencing there. So I can test on my testing machine, which interval is set to the SessionLock you are having problems with?
Maybe what Edhy suggested could help too. I am not able to test the AppLife since I have an update procedure of my own, but maybe it is creating a second environment to be able to update the one already running and this is tricking the SessionLock to trigger on this one too and then the Keys will already exist on its list of open form.
Let me know if you would like me to test it in any other way.
Abraços.
|