[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.sdk

Monitoring Windows Time Change.

Eugene Lerner

10/10/2003 3:23:00 PM

Please help who knows how to watch for system time change.

I have a class library that creates an object
of 'NativeWindow' class and waits for "WM_TIMECHANGE"
that is broadcasted by Windows. This worked fine until I
started using my dll in Windows Service application.
Aparently Windows does not send "WM_TIMECHANGE"
to 'NativeWindow' created by background services.

I need any solution, not necessary "WM_TIMECHANGE"
handler. Just anything that would call client or raise
event if user changes PC's time.

Any help will be greatly appreciated!


23 Answers

Mr.Tickle

10/10/2003 4:28:00 PM

0

Why cant MS ship a class with the windows.h constants and any others that we
always have to redefine, this has been a problem since pre .NET VB. If
theyre not going to support the native stuff this way , why allow it in the
first place.


"Eugene Lerner" <elerner@trekds.com> wrote in message
news:003801c38f42$604f9e70$a301280a@phx.gbl...
> Please help who knows how to watch for system time change.
>
> I have a class library that creates an object
> of 'NativeWindow' class and waits for "WM_TIMECHANGE"
> that is broadcasted by Windows. This worked fine until I
> started using my dll in Windows Service application.
> Aparently Windows does not send "WM_TIMECHANGE"
> to 'NativeWindow' created by background services.
>
> I need any solution, not necessary "WM_TIMECHANGE"
> handler. Just anything that would call client or raise
> event if user changes PC's time.
>
> Any help will be greatly appreciated!
>
>


Eugene Lerner

10/10/2003 5:00:00 PM

0

Thank you, but this did not solve my problem. I'm not
worried about converting "windows.h" into C#. My problem
is how to receive a notification when user has changed
time in the PC.

>-----Original Message-----
>"Mr.Tickle" <MrTickle@mrmen.com> wrote in
>news:uaQaOr0jDHA.1708@TK2MSFTNGP12.phx.gbl:
>
>> Why cant MS ship a class with the windows.h constants
and any others
>> that we always have to redefine, this has been a
problem since pre
>> .NET VB. If theyre not going to support the native
stuff this way ,
>> why allow it in the first place.
>
>I got tired of seeing this complaint, so here's a file
that has all the
>constants. Lets hope my newsbrowser attaches it
correctly, and that I'm
>not violating any posting rules. Email me if you can't
get it and still
>want it.
>
>DISCLAIMER: This is NOT my code, and I can't remember
where I found it.
>This is why you should always put some kind of comments
at the top of your
>file.
>
>-mbray
>
>

Phil Wilson

10/10/2003 5:21:00 PM

0

See if SystemEvents.TimeChanged is what you want.
--
Phil Wilson [MVP Windows Installer]
----
"Eugene Lerner" <elerner@trekds.com> wrote in message
news:003801c38f42$604f9e70$a301280a@phx.gbl...
> Please help who knows how to watch for system time change.
>
> I have a class library that creates an object
> of 'NativeWindow' class and waits for "WM_TIMECHANGE"
> that is broadcasted by Windows. This worked fine until I
> started using my dll in Windows Service application.
> Aparently Windows does not send "WM_TIMECHANGE"
> to 'NativeWindow' created by background services.
>
> I need any solution, not necessary "WM_TIMECHANGE"
> handler. Just anything that would call client or raise
> event if user changes PC's time.
>
> Any help will be greatly appreciated!
>
>


Mr.Tickle

10/10/2003 5:50:00 PM

0

Yeah but still its reinventing the wheel isnt it :D Thanks anyway. Doesnt
take much to convert the .H file so why wont MS do it and put it under
Microsoft.Win32.* blah namespace.

There is huge gaping holes in the libraries in .NET that you can drive a
planet through.


"Eugene Lerner" <elerner@trekds.com> wrote in message
news:2757401c38f4f$fd1a3f50$a601280a@phx.gbl...
> Thank you, but this did not solve my problem. I'm not
> worried about converting "windows.h" into C#. My problem
> is how to receive a notification when user has changed
> time in the PC.
>
> >-----Original Message-----
> >"Mr.Tickle" <MrTickle@mrmen.com> wrote in
> >news:uaQaOr0jDHA.1708@TK2MSFTNGP12.phx.gbl:
> >
> >> Why cant MS ship a class with the windows.h constants
> and any others
> >> that we always have to redefine, this has been a
> problem since pre
> >> .NET VB. If theyre not going to support the native
> stuff this way ,
> >> why allow it in the first place.
> >
> >I got tired of seeing this complaint, so here's a file
> that has all the
> >constants. Lets hope my newsbrowser attaches it
> correctly, and that I'm
> >not violating any posting rules. Email me if you can't
> get it and still
> >want it.
> >
> >DISCLAIMER: This is NOT my code, and I can't remember
> where I found it.
> >This is why you should always put some kind of comments
> at the top of your
> >file.
> >
> >-mbray
> >
> >


v-yiy

10/13/2003 2:05:00 AM

0

Hi Eugene,
I agree with our MVP. It seems the SystemEvents.TimeChanged event is your
right choice.
If anything I can help, please let me know.


Best regards,

Ying-Shen Yu [MSFT]
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security

This posting is provided "AS IS" with no warranties and confers no rights.
You should not reply this mail directly, "Online" should be removed before
sending, Thanks!

--------------------
| Reply-To: "Phil Wilson" <phil.wilson@unisys.spamcom>
| From: "Phil Wilson" <phil.wilson@unisys.spamcom>
| References: <003801c38f42$604f9e70$a301280a@phx.gbl>
| Subject: Re: Monitoring Windows Time Change.
| Date: Fri, 10 Oct 2003 10:20:39 -0700
| Lines: 24
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <#Y#2UL1jDHA.3700@TK2MSFTNGP11.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.sdk
| NNTP-Posting-Host: 192.59.186.207
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP11.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.sdk:7744
| X-Tomcat-NG: microsoft.public.dotnet.framework.sdk
|
| See if SystemEvents.TimeChanged is what you want.
| --
| Phil Wilson [MVP Windows Installer]
| ----
| "Eugene Lerner" <elerner@trekds.com> wrote in message
| news:003801c38f42$604f9e70$a301280a@phx.gbl...
| > Please help who knows how to watch for system time change.
| >
| > I have a class library that creates an object
| > of 'NativeWindow' class and waits for "WM_TIMECHANGE"
| > that is broadcasted by Windows. This worked fine until I
| > started using my dll in Windows Service application.
| > Aparently Windows does not send "WM_TIMECHANGE"
| > to 'NativeWindow' created by background services.
| >
| > I need any solution, not necessary "WM_TIMECHANGE"
| > handler. Just anything that would call client or raise
| > event if user changes PC's time.
| >
| > Any help will be greatly appreciated!
| >
| >
|
|
|

Willy Denoyette

11/2/2003 9:06:00 PM

0

Do you realy think MS should wrap all of the ~70000 Win32 API's in a Microsoft.Win32.* blah namespace, or do you have a list of
prefered API's? If yes, I'm just currious to see it, I'm sure a lot of them are available through some Managed FCL classes.

Willy.

"Mr.Tickle" <MrTickle@mrmen.com> wrote in message news:u4YXEZ1jDHA.1676@TK2MSFTNGP09.phx.gbl...
> Yeah but still its reinventing the wheel isnt it :D Thanks anyway. Doesnt
> take much to convert the .H file so why wont MS do it and put it under
> Microsoft.Win32.* blah namespace.
>
> There is huge gaping holes in the libraries in .NET that you can drive a
> planet through.
>
>
> "Eugene Lerner" <elerner@trekds.com> wrote in message
> news:2757401c38f4f$fd1a3f50$a601280a@phx.gbl...
> > Thank you, but this did not solve my problem. I'm not
> > worried about converting "windows.h" into C#. My problem
> > is how to receive a notification when user has changed
> > time in the PC.
> >
> > >-----Original Message-----
> > >"Mr.Tickle" <MrTickle@mrmen.com> wrote in
> > >news:uaQaOr0jDHA.1708@TK2MSFTNGP12.phx.gbl:
> > >
> > >> Why cant MS ship a class with the windows.h constants
> > and any others
> > >> that we always have to redefine, this has been a
> > problem since pre
> > >> .NET VB. If theyre not going to support the native
> > stuff this way ,
> > >> why allow it in the first place.
> > >
> > >I got tired of seeing this complaint, so here's a file
> > that has all the
> > >constants. Lets hope my newsbrowser attaches it
> > correctly, and that I'm
> > >not violating any posting rules. Email me if you can't
> > get it and still
> > >want it.
> > >
> > >DISCLAIMER: This is NOT my code, and I can't remember
> > where I found it.
> > >This is why you should always put some kind of comments
> > at the top of your
> > >file.
> > >
> > >-mbray
> > >
> > >
>
>


Viejo Vizcacha

3/13/2009 1:59:00 AM

0

On Mar 12, 9:45 pm, Viejo Vizcacha <nats_ugly...@yahoo.com> wrote:
> On Mar 12, 9:33 pm, "Bufozzo" <educad...@gmail.com> wrote:
>
>
>
> > "Viejo Vizcacha" <elbie_jovis_ka...@yahoo.com> escribió en el mensaje
> > news:98399$49b9b1c4$d8fec330
>
> > > Lo que hoy es Ucrania formaba parte del territorio de los Khazars, una
> > > tribu seminómada que se convirtió en masa al judaísmo, y que son los
> > > antepasados de los que hoy llamamos judíos ashkenazis.  El budismo nació
> > > del hinduísmo, así como el cristianismo y el islamismo nacieron del
> > > judaísmo.  Algunos dicen que Jesus nunca existió, y que su origen es en
> > > realidad una leyenda egipcia.  En Egipto lo distintivo son las pirámides y
> > > la mayor pirámide es la de Maddoff que se las arregló para despilfarrar 50
> > > mil millones de dólares.  Y de Egipto era el novio de la princesa Diana,
> > > cuya muerte forma parte de la serie de muertes misteriosas, junto a las
> > > muertes de los Kennedys.
>
> > Cuanto sabe este tipo, che ! ! !
> > Había un programa de TV muy bueno que acá se llamaba "Relaciones".Era de un
> > tipo que relacionaba temas científicos.
>
> > Sr Bufozzo
>
> Me gustó mucho ese programa.  Estaba muy bien, y se aprendía mucho.
> Estaría muy bien si lo volvieran a pasar.  Claro que se permitía menos
> libertades que yo en las relaciones.
>
> ViejoVizcacha

Aquí se llamaba "Connections". Tuvo mucho éxito.

http://en.wikipedia.org/wiki/Co...(TV_series)

Bufozzo

3/13/2009 2:24:00 AM

0


"Viejo Vizcacha" <nats_uglyman@yahoo.com> escribió en el mensaje
news:697bc609-6e27-4ebd-b71b->
> Me gustó mucho ese programa. Estaba muy bien, y se aprendía mucho.
> Estaría muy bien si lo volvieran a pasar. Claro que se permitía menos
> libertades que yo en las relaciones.
>
> ViejoVizcacha

Aquí se llamaba "Connections". Tuvo mucho éxito.

http://en.wikipedia.org/wiki/Co...(TV_series)
----------------------------------------------
Fijesé usted que fueron solo 10 episodios, me habían parecido mas.
Que agradecidos estábamos en esos tiempos ante una propuesta así.
Ahora la TV es 95% mierda, pero hay tanta cantidad que en ese 5% uno puede
pasarse muchas horas diarias.

Sr Bufozzo



tschmidtundert

3/13/2009 2:49:00 AM

0

On Mar 12, 6:24 pm, "Bufozzo" <educad...@gmail.com> wrote:
> "Viejo Vizcacha" <nats_ugly...@yahoo.com> escribió en el mensaje
> news:697bc609-6e27-4ebd-b71b->
>
> > Me gustó mucho ese programa. Estaba muy bien, y se aprendía mucho.
> > Estaría muy bien si lo volvieran a pasar. Claro que se permitía menos
> > libertades que yo en las relaciones.
>
> > ViejoVizcacha
>
> Aquí se llamaba "Connections".  Tuvo mucho éxito.
>
> http://en.wikipedia.org/wiki/Co...(TV_series)
> ----------------------------------------------
> Fijesé usted que fueron solo 10 episodios, me habían parecido mas.
> Que agradecidos estábamos en esos tiempos ante una propuesta así.
> Ahora la TV es 95% mierda, pero hay tanta cantidad que en ese 5% uno puede
> pasarse muchas horas diarias.
>
> Sr Bufozzo

Excelente programa televisivo. A mí me gustaba trata de adivinar para
donde iba la trama. Burke lo hací extremadamente interesante.

T.Schmidt
P.S. Yo creo que los viejos mas que nadie disfrutamos tratando de
desenmarañar las historias que nos han ido metiendo en la cabeza. Los
jóvenes son mas dados a creer lo que les cuentan porque no tienen
mucha experiencia viendo las consecuencias de vivir engañado. No se
dan cuenta que así como la esposa lo puede estar engañando, los
gobiernos y las instituciones lo hacen para beneficio de ellos.

GeorgesBab

3/13/2009 1:22:00 PM

0

Sobre Buddha, no es tan simple. En realidad, los ucranianos salen al
encuentro asi a las teorias muy populares y promulgadas por los
scientificos rusos (escuela de Fomenco) segun las cuales Achiles
(Aquiles) era un principe ruso quien vino a ayudar a los griegos, asi
que tienen el derecho a los estrechos de Constantinopla (Ankara). Cada
vez que un pais descubre algo, el otro descubre algo mAs grande e
importante.Seria gracioso, si a veces no fuera tragico (dos aviones
derribados por los artilleros ucranianos en Georgia, etc.).

Saludos,
George