View Single Post
Old 08-20-2006, 06:57 PM   #9
veetid
MySQL Error
 
veetid's Avatar
 
Join Date: Apr 2004
Posts: 4,994
Quote: Originally Posted by stric View Post
David, could you tell me what is called when system is resuming? Or at least give me some directions. (I couldn't find anything useable in SDK help)

It's just one of the CF Events...

Place this in CF_pluginInit():

this.CF_Event_powerModeChanged += new Microsoft.Win32.PowerModeChangedEventHandler(obdii _CF_Event_powerModeChanged);

Then put this function somewhere:

private void volume_CF_Event_powerModeChanged(object sender, Microsoft.Win32.PowerModeChangedEventArgs e)
{
if(e.Mode == Microsoft.Win32.PowerModes.Resume)
{
//run code to adjust volume here
}
}

There are other members of that enumeration such as PowerModes.Standby, etc... So you can do things when it is going down or coming back up...

david
__________________
__________________
CENTRAFUSE http://www.centrafuse.com
01 Jeep Cherokee Sport 4x4 Installed
M10000/512Mb/20GB, Lilliput 7", Holux GM-210
veetid is offline   Reply With Quote