ThunderMusic
Fri Sep 15 13:23:14 CDT 2006
I've found a solution, tought maybe it's not the best way, it does the trick
pretty well :
http://www.thescripts.com/forum/thread225183.html
thanks to all
ThunderMusic
"Peter Duniho" <NpOeStPeAdM@NnOwSlPiAnMk.com> wrote in message
news:12glrgu34g9169c@corp.supernews.com...
> "ThunderMusic" <NoSpAmdanlatathotmaildotcom@NoSpAm.com> wrote in message
> news:eyf$xqO2GHA.4116@TK2MSFTNGP02.phx.gbl...
>> ok, but msn does it very very very well, there's certainly a way... Is
>> there a way to know the state of the computer, locked/unlocked.
>
> As Michael and John both posted, there IS a way. Test to see if your
> window is visible (if it's not, and you haven't specifically made it not
> visible, then the session is locked). Of course, you do need a window for
> that to work.
>
>> It does not have to be an event. Only a function that returns locked/not
>> locked. maybe via the user account?
>
> Also, see the SessionSwitch SystemEvent. It provides access to the
> WM_WTSSESSION_CHANGE window message in .NET. As long as your program is
> running, you can use that message to track when session changes occur
> (including locking and unlocking).
>
> By the way, I'd disagree that MSN does this "very well". I've seen it get
> confused plenty of times. :)
>
> Pete
>