Article View: free.it.visual-basic
Article #606Re: Spegnere il pc
From: maxps
Date: Wed, 02 Nov 2005 08:08
Date: Wed, 02 Nov 2005 08:08
55 lines
2431 bytes
2431 bytes
Declare Function ExitWindowsEx& Lib "user32" _
(ByVal uFlags&, ByVal wReserved&)
' Le costanti
Global Const EWX_LOGOFF = 0 ' Chiude la sessione
Global Const EWX_SHUTDOWN = 1 ' Chiude il sistema
Global Const EWX_REBOOT = 2 ' Riavvia il sistema
Global Const EWX_FORCE = 4 ' Chiude eventuali applicazioni aperte
Global Const EWX_POWEROFF = 8 ' Solo in PII ATX
'Adesso puoi chiamare uno ShutDown/un Reboot/un Logoff
'con questa chiamata
lresult = ExitWindowsEx(EWX_SHUTDOWN, 0&)
'shutdown del computer
bye...Alla prox...:-)))
*******************************************************************
"ZonaRossa" <00000@null.ci> ha scritto nel messaggio
news:_Lq8f.6457$hC1.2809@tornado.fastwebnet.it...
>
> "Giovanni" <giovxxxx@virgilio.it> ha scritto nel messaggio
> news:436222cc$0$29544$4fafbaef@reader1.news.tin.it...
>>
>> >>> Scusa temo di non aver capito puoi riscrivere tutto il codice
>> >>> corretto?
>> Grazie
>>>>
>>>>>ECCOLO....
>>>> ###########################################################
>>>> Dim ZonaRossa As Object
>>>>
>>>> Set ZonaRossa = CreateObject("Shell.Application")
>>>> ZonaRossa.ShutdownWindows
>>>> Set ZonaRossa = Nothing
>>>>
>>>> ###########################################################
>>>>
>>>> _________________________
>>>> by ZonaRossa
>>
>>>
>>
>
>
Technical Details
Message-ID:
<4368739d$1_3@x-privat.org>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news4.google.com!news2.volia.net!feeder.news.tin.it!news-out.tin.it!x-privat.org!not-for-mailReferences:
<43620ed8$0$13360$4fafbaef@reader2.news.tin.it> <Ghp8f.6280$hC1.1170@tornado.fastwebnet.it> <skp8f.6284$hC1.3495@tornado.fastwebnet.it> <436222cc$0$29544$4fafbaef@reader1.news.tin.it> <_Lq8f.6457$hC1.2809@tornado.fastwebnet.it>Show Full Headers
Complete Article Headers
X-Google-Thread: f94ee,6da2bb0fbcb3dab4 X-Google-Attributes: gidf94ee,public X-Google-Language: ITALIAN,ASCII-7-bit From: "maxps" <alez234@hotmail.com> Newsgroups: free.it.visual-basic References: <43620ed8$0$13360$4fafbaef@reader2.news.tin.it> <Ghp8f.6280$hC1.1170@tornado.fastwebnet.it> <skp8f.6284$hC1.3495@tornado.fastwebnet.it> <436222cc$0$29544$4fafbaef@reader1.news.tin.it> <_Lq8f.6457$hC1.2809@tornado.fastwebnet.it> Subject: Re: Spegnere il pc Date: Wed, 2 Nov 2005 09:08:41 +0100 Lines: 57 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-RFC2646: Format=Flowed; Response NNTP-Posting-Host: $$_ewcqeiunnxl$.x-privat.org Message-ID: <4368739d$1_3@x-privat.org> Organization: X-Privat NNTP Server - http://www.x-privat.org X-Authenticated-User: $$e01akcax02o9cl$bayv X-Complaints-To: abuse@x-privat.org Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news4.google.com!news2.volia.net!feeder.news.tin.it!news-out.tin.it!x-privat.org!not-for-mail