Ignacio Machin ( .NET/ C# MVP ), grazie al ripristinarsi del
collegamento fra i due neuroni, mercoledì ha scritto:
One of the form of the solution has a timer, and the timer calls a
Unfortunately, there is a .Net documented bug that makes the app crash
if graphical refreshes are frequently called when the app itself is in
background ina terminal server session.
Now, a customer is in this unlucky situation: the operators use then
client in each own terminal server session, the client makes a
graphical layout refresh according to some SqlServer data, but if the
operator opens another application, and puts my client application in
background or minimized, the app itself crashes.
At the present, MS does not provide any solution, so the only thing I
can do is to try to avoid this refresh.
But: How can I determine if the app is in background?
No, the form has to be repainted if the app has the focus.
If the app has the focus, but the operator clicked on a menu or on a
treeview menu, the form itself is active, but with no focus. If the app
is minimized, the form is anyway active, with no focus, but this causes
I don't exactly know what a worker thread is...
But the app has always an active form, even if the app is in
I also tried enumerating and testing on Application.Openforms, but if I
click on a treeview menu (by example), I don't find any form with
.Focused property True.
La forza di volontà è guardare negli occhi una ragazza in topless.