Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > DB-Aware

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 06-18-2005, 06:29 AM
kacper kacper is offline
Member
 
Join Date: May 2005
Posts: 90
Default Shutdown/reboot/Standby/Hiberation

How to Shutdown/reboot/Standby/Hiberation windows XP,2000,ME AND Shutdown/reboot/Standby Windows 98,95??
Reply With Quote
  #2  
Old 06-18-2005, 06:42 AM
douglas douglas is offline
Senior Member
 
Join Date: Jul 2001
Posts: 7,695
Default RE: Shutdown/reboot/Standby/Hiberation

These have been visited many times:

http://www.delphipages.com/threads/index.cfm?LSR=1&SR=Reboot&SC=2&AO=and


http://www.delphipages.com/threads/thread.cfm?ID=129788&G=129784
http://www.delphi3000.com/articles/article_2487.asp?SK=Shutdown
http://www.swissdelphicenter.ch/en/showcode.php?id=168

http://www.delphipages.com/threads/thread.cfm?ID=111501&G=111501
http://www.delphipages.com/threads/thread.cfm?ID=110963&G=110963


and im sure if you do a google search on Delphi + those jeywords, you will get many returns.... especially if you search the Google Groups area.


Your major concern will to decipher what operating system you are running the application on, then determine select the code which matches that OS...



If this helps, please accept as answer!

UnSysApps
Reply With Quote
  #3  
Old 06-18-2005, 08:53 AM
Jasser Jasser is offline
Moderator
 
Join Date: Jan 2005
Location: Saudi Arabia
Posts: 5,059
Default RE: Shutdown/reboot/Standby/Hiberation

//To logoff.
ExitWindowsEx(EWX_LOGOFF,1);


//To shutdown.
ExitWindowsEx(EWX_SHUTDOWN,1);


//To reboot.
ExitWindowsEx(EWX_REBOOT,1);


//To power off.
ExitWindowsEx(EWX_POWEROFF,1);

//To hibernate.
http://www.swissdelphicenter.ch/en/showcode.php?id=1401



Regards,
Abdulaziz Jasser
Reply With Quote
  #4  
Old 06-20-2005, 02:52 AM
kacper kacper is offline
Member
 
Join Date: May 2005
Posts: 90
Default RE: Shutdown/reboot/Standby/Hiberation

The code at: http://www.swissdelphicenter.ch/en/showcode.php?id=1401 donīt work.. Do you have a other code??
Reply With Quote
  #5  
Old 06-20-2005, 10:45 AM
Jasser Jasser is offline
Moderator
 
Join Date: Jan 2005
Location: Saudi Arabia
Posts: 5,059
Default RE: Shutdown/reboot/Standby/Hiberation

Kacper,

Use this procedure, which I created for you:

USES ShellApi;
.................................................. .
.................................................. .
.................................................. .
procedure HibernateWindows;
begin
ShellExecute(Application.Handle, 'open', 'rundll32.exe', PChar( 'Powrprof.dll,SetSuspendState' ), nil, SW_SHOWNORMAL);
end;


Regards,
Abdulaziz Jasser
Reply With Quote
  #6  
Old 06-22-2005, 09:16 AM
Jasser Jasser is offline
Moderator
 
Join Date: Jan 2005
Location: Saudi Arabia
Posts: 5,059
Default RE: Shutdown/reboot/Standby/Hiberation

Kacper, if my previous reply was helpful, please press the red button at the top-right of your screen

Regards,
Abdulaziz Jasser
Reply With Quote
  #7  
Old 06-24-2005, 06:04 AM
douglas douglas is offline
Senior Member
 
Join Date: Jul 2001
Posts: 7,695
Default RE: Shutdown/reboot/Standby/Hiberation

Has this question been Answered?



If this helps, please accept as answer!

UnSysApps
Reply With Quote
  #8  
Old 06-25-2005, 02:12 AM
kacper kacper is offline
Member
 
Join Date: May 2005
Posts: 90
Default RE: Shutdown/reboot/Standby/Hiberation

I have found a component for that.. I donīt remeber the link to the component but the component works.. Thanks anyway.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:54 PM.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2019, vBulletin Solutions, Inc.