Have you tried using SystemEvents.PowerModeChanged? Maybe this event triggers prior to TimeChanged then you can set some sort of Flag that Power Mode was changed so TimeChanged event should NOT do its work.
On Sat, Feb 5, 2011 at 12:13 AM, Marcus <[email protected]> wrote: > Isn't this what is wrapped inside the .Net SystemEvents.TimeChanged > event? I would recon it is. > > > On 4 Feb, 06:51, Arsalan Tamiz <[email protected]> wrote: > > I guess you need to listen for the WM_TIMECHANGE windows message. > > > > > > > > On Fri, Feb 4, 2011 at 12:33 AM, Marcus <[email protected]> wrote: > > > On 3 Feb, 18:01, Stephen Russell <[email protected]> wrote: > > > > On Thu, Feb 3, 2011 at 10:57 AM, Marcus <[email protected]> > wrote: > > > > > How can I capture the event of the user changing the system time > > > > > > > I have tried using SystemEvents.TimeChanged event for this. > > > > > This event though is also raised when my computer has been sleeping > or > > > > > hybernating for a while and I "wake it up". This is of course > because > > > > > the time is set forward with the same amount of time as the > computer > > > > > was sleeping/hybernating. > > > > > > > I do not want my handler to get invoked at these occasions though,I > > > > > need to capture only when the user explicitly changes the system > time. > > > > > > -------------------------------- > > > > > > Pretty sure that is a security control for the domain that can be > > > > scripted for a login event to the AD. > > > > > > I don't know enough to tell you more sorry but I know that you can > > > > STOP people from changing a time/date to make Fraud occur. > > > > > > -- > > > > Stephen Russell > > > > > > Sr. Production Systems Programmer > > > > CIMSgts > > > > > > 901.246-0159 cell > > > > > Thanks for answering. > > > I am not sure if I understood your answer though. > > > To clearify a bit - my app (c#) is only running on a local machine. > > > The changes in system time that I want to capture is only for the same > > > computer that my app runs on. So I want to, from my app be able to > > > find out if the user is changing the system time through the Windows > > > GUI of that computer while my app is running. > > > > > About the prevention of time change that you mention.How do I do that > > > programmatically? That would probably suffice for my needs. > > > > > /Marcus- Dölj citerad text - > > > > - Visa citerad text -
