Click here to Skip to main content
15,894,337 members
Home / Discussions / C#
   

C#

 
GeneralRe: Probably Reflection... but how? Pin
Heath Stewart5-Aug-04 3:35
protectorHeath Stewart5-Aug-04 3:35 
Generalget opened folder in Outlook Pin
Stephan Wright5-Aug-04 0:36
Stephan Wright5-Aug-04 0:36 
GeneralRe: get opened folder in Outlook Pin
Michael P Butler5-Aug-04 4:09
Michael P Butler5-Aug-04 4:09 
GeneralRe: get opened folder in Outlook Pin
Stephan Wright5-Aug-04 22:46
Stephan Wright5-Aug-04 22:46 
GeneralRe: get opened folder in Outlook Pin
Michael P Butler5-Aug-04 22:51
Michael P Butler5-Aug-04 22:51 
GeneralRe: get opened folder in Outlook Pin
Stephan Wright5-Aug-04 23:01
Stephan Wright5-Aug-04 23:01 
GeneralRe: get opened folder in Outlook Pin
Michael P Butler5-Aug-04 23:17
Michael P Butler5-Aug-04 23:17 
Generaldisable poweroff function Pin
JockerSoft4-Aug-04 22:57
JockerSoft4-Aug-04 22:57 
hi,
I'm developing a mediaplayer, and I need to disable the screensaver and the poweroff functions while playing a video file.

on msdn I found that I have to use the SystemParametersInfo[^] function.
This code works only partially: the screensaver is disabled, but the monitor is still switched off by the system.

[DllImport("user32.dll")]<br />
private static extern bool SystemParametersInfo<br />
(<br />
   uint action,<br />
   uint param,<br />
   object data,<br />
   uint winini<br />
);<br />
<br />
private const int SPI_SETSCREENSAVEACTIVE = 0x0011;  //17<br />
private const int SPI_SETPOWEROFFACTIVE = 0x0056;  //86<br />
<br />
private void someMethod()<br />
{<br />
   //disable screensaver. this works<br />
   SystemParametersInfo(SPI_SETSCREENSAVEACTIVE, 0, null, 0);	<br />
<br />
   //disable poweroff. doesn't work<br />
   SystemParametersInfo(SPI_SETPOWEROFFACTIVE, 0, null, 0);<br />
}


what's wrong?
thank you

________
http://www.jockersoft.altervista.org
GeneralRe: disable poweroff function Pin
leppie5-Aug-04 0:45
leppie5-Aug-04 0:45 
GeneralRe: disable poweroff function Pin
Heath Stewart5-Aug-04 1:46
protectorHeath Stewart5-Aug-04 1:46 
GeneralRe: disable poweroff function Pin
Heath Stewart5-Aug-04 2:24
protectorHeath Stewart5-Aug-04 2:24 
GeneralRe: disable poweroff function Pin
Dave Kreskowiak5-Aug-04 8:10
mveDave Kreskowiak5-Aug-04 8:10 
GeneralRe: disable poweroff function Pin
JockerSoft5-Aug-04 22:25
JockerSoft5-Aug-04 22:25 
Questionhow to check if instance is running Pin
Stephan Wright4-Aug-04 22:48
Stephan Wright4-Aug-04 22:48 
AnswerRe: how to check if instance is running Pin
leppie4-Aug-04 22:57
leppie4-Aug-04 22:57 
AnswerRe: how to check if instance is running Pin
exhaulted4-Aug-04 23:09
exhaulted4-Aug-04 23:09 
GeneralRe: how to check if instance is running Pin
leppie5-Aug-04 0:48
leppie5-Aug-04 0:48 
GeneralRe: how to check if instance is running Pin
Heath Stewart5-Aug-04 1:44
protectorHeath Stewart5-Aug-04 1:44 
AnswerRe: how to check if instance is running Pin
Michael P Butler5-Aug-04 0:43
Michael P Butler5-Aug-04 0:43 
GeneralRe: how to check if instance is running Pin
Stephan Wright5-Aug-04 1:09
Stephan Wright5-Aug-04 1:09 
GeneralBHO's vs Firewalls Pin
Stuggo4-Aug-04 21:53
Stuggo4-Aug-04 21:53 
GeneralRe: BHO's vs Firewalls Pin
Brian Delahunty4-Aug-04 23:22
Brian Delahunty4-Aug-04 23:22 
GeneralRe: BHO's vs Firewalls Pin
Stuggo5-Aug-04 0:26
Stuggo5-Aug-04 0:26 
GeneralRe: BHO's vs Firewalls Pin
Heath Stewart5-Aug-04 1:33
protectorHeath Stewart5-Aug-04 1:33 
GeneralRe: BHO's vs Firewalls Pin
Dave Kreskowiak5-Aug-04 7:43
mveDave Kreskowiak5-Aug-04 7:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.