Hello Leslie,
I suppose you need to handle the Microsoft.Win32.SystemEvents.SessionSwitch
event to handle the situation when the user locking the station.
So you need to change your architecture slightly to keep the queue of alerts
and shows the latest event after this event's arise
---
WBR, Michael Nemtsev [.NET/C# MVP].
My blog: http://spaces.live.com/laflour
Team blog: http://devkids.blogspot.com/
"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
L> I have a C# .NET Framework 1.1 application running on XP SP2 that
L> displays alerts. When no alerts are active, the application is
L> hidden. The app runs a background thread to check for alerts. When an
L> alert is detected, the message information is displayed using a
L> delegate to update the UI and display the window. This works great as
L> long as the screen saver is not active. However when the screen saver
L> is active (and password protected) the text in the alert window gets
L> updated but when the computer is unlocked the alert window does not
L> display the new text. I have tried calling Invalidate, Update,
L> Activate, Refresh, but nothing seems to actually cause the full
L> window and all child controls to refresh and show the updated
L> contents.
L>
L> What do I need to do to cause the updated information to display
L> properly when the machine is unlocked from the screen saver?
L>
L> Thanks,
L>
L> Leslie
L>
Leslie - 18 Jun 2007 20:44 GMT
Michael,
This sounds like the correct solution. Unfortunately SessionSwitch is not
supported in 1.1. Are there any other approaches other than trapping the
event using InteropServices?
Also, is this normal behavior? In this case I have updated the text in the
text box and if I select the "invisible text" using the mouse, it shows up,
but until I interact with with window or somehow cause it to refresh manually
the text remains hidden.
Thanks,
Leslie
> Hello Leslie,
>
[quoted text clipped - 31 lines]
> L> Leslie
> L>
Michael Nemtsev - 18 Jun 2007 21:03 GMT
Hello Leslie,
Then use API WTSRegisterSessionNotification methods.
It's used by .NET SessionSwitch
---
WBR, Michael Nemtsev [.NET/C# MVP].
My blog: http://spaces.live.com/laflour
Team blog: http://devkids.blogspot.com/
"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
L> Michael,
L>
L> This sounds like the correct solution. Unfortunately SessionSwitch is
L> not supported in 1.1. Are there any other approaches other than
L> trapping the event using InteropServices?
L>
L> Also, is this normal behavior? In this case I have updated the text
L> in the text box and if I select the "invisible text" using the mouse,
L> it shows up, but until I interact with with window or somehow cause
L> it to refresh manually the text remains hidden.
L>
L> Thanks,
L>
L> Leslie
L>
L> "Michael Nemtsev" wrote:
L>
>> Hello Leslie,
>>
[quoted text clipped - 37 lines]
>> L> Leslie
>> L
Leslie - 18 Jun 2007 21:14 GMT
Michael,
Will do. Thanks for your help.
Leslie
> Hello Leslie,
>
[quoted text clipped - 67 lines]
> >> L> Leslie
> >> L>