Foros Club Delphi

Foros Club Delphi (https://www.clubdelphi.com/foros/index.php)
-   Trucos (https://www.clubdelphi.com/foros/forumdisplay.php?f=52)
-   -   Reiniciar o apagar Windows (https://www.clubdelphi.com/foros/showthread.php?t=80561)

dec 30-06-2006 13:54:38

Reiniciar o apagar Windows
 
¿Cómo puedo apagar el ordenador o hacer un reset desde mi programa?

Código Delphi [-]
if ExitWindowsEx (0,0) = 0 then
  showmessage ('No puedorrr reiniciar Windows');

if ExitWindowsEx (1,0) = 0 then
  showmessage ('No puedorrr cerrar el ordenador');

if ExitWindowsEx (2,0) = 0 then
  showmessage ('No puedorrr reiniciar el ordenador');


La franja horaria es GMT +2. Ahora son las 12:48:56.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi