Autor Beitrag
stigge
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 426

WinXP
Delphi 2007
BeitragVerfasst: Do 11.01.07 20:38 
Wenn ich auf button1 klicke soll der Computer herunterfahren und sich ausschalten.
Wie mache ich das? Hab schon vieles in anderen Beiträgen gelesen, mit abmelden funktioniert es auch aber mit ausschalten nicht. Warum?


Moderiert von user profile iconChristian S.: Topic aus Delphi Language (Object-Pascal) / CLX verschoben am Do 11.01.2007 um 20:41
JayEff
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2971

Windows Vista Ultimate
D7 Enterprise
BeitragVerfasst: Do 11.01.07 20:43 
Versuch mal, WM_Close an ALLE Programme gleichzeitig zu senden, das mögen sie auch nicht ;) Bei meinem Schulcomputer auf dem ich es getestet hab, wurde der Herunterfahrendialog angezeigt ^^

ausblenden Delphi-Quelltext
1:
sendmessage(HWND_BROADCAST, WM_CLOSE, 0, 0);					

_________________
>+++[>+++[>++++++++<-]<-]<++++[>++++[>>>+++++++<<<-]<-]<<++
[>++[>++[>>++++<<-]<-]<-]>>>>>++++++++++++++++++.+++++++.>++.-.<<.>>--.<+++++..<+.
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19346
Erhaltene Danke: 1754

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Do 11.01.07 20:47 
Timosch
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 1314

Debian Squeeze, Win 7 Prof.
D7 Pers
BeitragVerfasst: Fr 12.01.07 16:37 
Genau, im Link des letzten Posts liegt des Rätsels Lösung. Unter NT und Konsorten (also auch 2k, XP, 2k3 und Vista) muss vorher ein Privileg gesetzt sein.

_________________
If liberty means anything at all, it means the right to tell people what they do not want to hear. - George Orwell