How can I do this in a C# program? I\'m pretty sure it should be possible, since various media programs for example do this so the computer doesn\'t go into stand-by while w
I think you'll have to P/Invoke. But don't be scared... it's pretty easy.
SetThreadExecutionState is your friend. It's available in the PInvoke project, also available on NuGet.