The MP3car.com Store  

Welcome to the MP3Car.com forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. Registering will also remove advertisements. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

Go Back   MP3Car.com > Mp3Car Technical > Software & Software Development

Reply
 
Thread Tools Display Modes
Old 04-26-2004, 07:56 PM   #1
FLA
 
gospeed.racer's Avatar
 
Join Date: Dec 2003
Location: Portland, OR
Posts: 1,287
My Photos: (0)
Desktop Button for standby or hibernate?

Anybody able to do me a huge favor and make me a desktop button I can click to put my computer into standby or hibernate? I had a hibernate button once, but that...was a long long time ago. I cant find it anymore

Thanks! -Jeff

DOH....Found it.....http://www.newfreeware.com/desktop/249/

The only problem is I kind of need a button, and this is just a tray icon.

IWhen I searched a different set of keywords i found that I had posted this last year. Ever have a Monday? I need a beer.
__________________
00 Focus LX soon to be boosted!
88 Escort GT Turbo DFI

Last edited by gospeed.racer : 04-26-2004 at 08:08 PM.
gospeed.racer is offline   Reply With Quote
Sponsored Links
Old 04-26-2004, 08:54 PM   #2
Raw Wave
 
god_of_cpu's Avatar
 
Join Date: Jan 2004
Location: SilverSpring Maryland
Vehicle: 2003/Infiniti/G35 Sport Coupe
Posts: 2,957
My Photos: (0)
Wrote this cause I'm such a nice guy.

It runs completly off the command line, just pass it a shutdown command. Run without a command to get a list of the commands it supports. Just link a shortcut to this and put it on your desktop to get a desktop button.

Souce is included below. Attached is the binary, it will run on anything microsoft windows.

#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers

#include <windows.h>

int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
if (lstrcmpi(lpCmdLine,"hibernate")==0)
SetSystemPowerState( FALSE, FALSE );
else if (lstrcmpi(lpCmdLine, "standby") == 0)
SetSystemPowerState( TRUE, FALSE );
else if (lstrcmpi(lpCmdLine,"restart")==0)
{
ExitWindowsEx(EWX_REBOOT, 0);
} else if (lstrcmpi(lpCmdLine,"shutdown")==0)
{
ExitWindowsEx(EWX_SHUTDOWN, 0);
} else if (lstrcmpi(lpCmdLine,"blankscreen")==0)
{
SendMessage(GetDesktopWindow(), WM_SYSCOMMAND, SC_MONITORPOWER, 2);
} else if (lstrcmpi(lpCmdLine,"logoff")==0)
{
ExitWindowsEx(EWX_LOGOFF, 0);
}
else
MessageBox(NULL, "Usage: shutdown <parameter>\n\nValid Parameters:\n\tblankscreen\n\tlogoff\n\thibernate\ n\treboot\n\tstandby\n\tshutdown\n\nBrought to you by http://www.digitalwheelz.com", "Invalid Command Parameter", MB_ICONSTOP | MB_OK);

return 0;
}
Attached Files
File Type: zip shutdown.zip (12.2 KB, 281 views)
__________________
StreetDeck.com Developer (I am Chuck)
Get StreetDeck at http://www.streetdeck.com
The Official StreetDeck Forums have moved, please visit us at http://www.streetdeck.com/forum for official support for Streetdeck.
god_of_cpu is offline   Reply With Quote
Old 04-26-2004, 08:54 PM   #3
Raw Wave
 
wizardPC's Avatar
 
Join Date: Jun 2000
Location: Nashville
Vehicle: $800 1995 Plymouth Neon
Posts: 2,649
My Photos: (0)
http://grc.com/wizmo/wizmo.htm
__________________
Debt as of 1/1/05: $34,354.48
Debt as of July 4, 2007: $0.00 explanation
Total spent on wedding so far: $3885.79
Thanks to everyone for your support.
I'M DEBT FREE!!
wizardPC is offline   Reply With Quote
Old 04-26-2004, 08:56 PM   #4
FLA
 
gospeed.racer's Avatar
 
Join Date: Dec 2003
Location: Portland, OR
Posts: 1,287
My Photos: (0)
Thanks guys, yer awesome!
__________________
00 Focus LX soon to be boosted!
88 Escort GT Turbo DFI
gospeed.racer is offline   Reply With Quote
Old 04-27-2004, 03:05 AM   #5
Raw Wave
 
Confused's Avatar
 
Join Date: Aug 2003
Location: Essex, England
Vehicle: Honda Prelude 2.2 VTEC / Ford Anglia 105E
Posts: 2,224
My Photos: (0)
Karen's Show Stopper


Garry
__________________
Co-Developer of A.I.M.E.E
www.aimee.cc
Confused is offline   Reply With Quote
Old 04-27-2004, 09:12 AM   #6
MySQL Error
MatrixPC's CarPC Specs
 
MatrixPC's Avatar
 
Join Date: Sep 2003
Location: Beach City, Socal
Vehicle: 89 Supra Turbo, 04 Toyota Matrix XR
Posts: 4,032
My Photos: (0)
isn't it Windows has an ultility called "shutdown.exe"?
With some switch, you can have it either shutdown, reboot, or hibernate.
After figure out which switch, you can create a bat file for it.
__________________
2004 Matrix XR A7N8X-VM/400 AMD XP-M 2500+, DS-ATX
89 Supra Turbo P3 600E@750/Abit BE6 II, Alpine M-BUS Car2PC.
Y2K Accord Dell GX150
RoadRunner is the best FE PERIOD
EmoRebellion is a SCAMMER
MatrixPC is offline   Reply With Quote
Old 04-27-2004, 11:47 AM   #7
Raw Wave
Defiler's CarPC Specs
 
Defiler's Avatar
 
Join Date: Jan 2002
Location: Temple Terrace, Fl.
Vehicle: '05 Shadow Mica Matrix XR
Posts: 2,606
My Photos: (1)
Here's how you can set up a restart button on your desktop:

1. Create a shortcut (Right-click on desktop, select New > Shortcut).

2. For location, type the following:

shutdown -r -t 0

3. Click Next, enter a name for the shortcut ("Restart" is appropriate), and click Finish.

When you click your Restart shortcut, Windows XP will reboot *automagically*!

The "-r" switch tells XP to reboot. If you'd like the shortcut to shut off your PC instead, change it to "-s"; to simply log off, change it to "-l". The "-t 0" sets the timeout (in seconds), so up this value if you find the need for it. To force running applications to close, add "-f" -- be careful with this one!

For more information on Shutdown, type "shutdown" in a command prompt window (Start > All Programs > Accessories > Command Prompt), or search for Shutdown in Windows XP's Help and Support Center.
__________________
/////Alpine PXA-H700
/////Alpine MRV-F345
Aura MR62 (F and R)
Sansa Clip
All wires by Knukonceptz.
My Current MP3s
IamDefiler.com
Still have tons of parts for sale!!! MB's, CPUs, Fans, etc. PM me and I will send a list.
Defiler is offline   Reply With Quote
Old 04-27-2004, 02:33 PM   #8
Newbie
 
Join Date: Aug 2003
Posts: 50
My Photos: (0)
Yes, but thats not hibernate or standby :P
bondbond55 is offline   Reply With Quote
Sponsored Links
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
linking into laptop power button corsamel General Hardware Discussion 18 09-06-2007 09:47 PM
Relocating computer power button King_Xerxes General Hardware Discussion 8 02-21-2007 09:15 PM
My computer won't hibernate Mtlca401 General Hardware Discussion 0 02-13-2004 09:39 AM
Exit button liquid_smoke Media Engine 1 02-04-2004 09:29 PM
PC power button problem BMp3W Power Supplies 4 10-12-2002 02:36 AM


All times are GMT -5. The time now is 04:51 PM.


Sponsored Links
The MP3car.com Store

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0
Copyright © 1999 - 2008 Mp3Car.com Inc.
Ad Management by RedTyger
Message Board Statistics