Thank you for all your answers, but I think that it was only Scott that
actully understod what I wanted, and led me to the solution.
Let's take this from the begining. In the Control Panel, select Power
Options. From here you can set the monttor to be automatically turned off
whenevere there has been a sertain time without any user input (very similar
to sceen saver, but that is another feature). This is great, except for when
you are watching a movie on your computer, you are usully not touching the
keyboard or the mouse, but you DO NOT want the monitor to be turned off (ok
if the movie is really bad, then perhaps automatic turning off the monitor
could be a great feature ;-) ).
So Scott lead me to the page
http://msdn2.microsoft.com/en-us/library/aa373208(VS.85).aspx , and from
that, I was able to write this VB.net module. It works!
Public Module modDisableTurnOffMonitor
Private Const ES_DISPLAY_REQUIRED As Integer = 2
Private Const ES_CONTINUOUS As Integer = -2147483648
Private Declare Function SetThreadExecutionState Lib "kernel32" (ByVal
esFlags As Integer) As Integer
Public Sub PreventPowerOptionTurnOffMonitor()
SetThreadExecutionState(ES_DISPLAY_REQUIRED + ES_CONTINUOUS)
End Sub
Public Sub RestorePowerOptionTurnOffMonitor()
SetThreadExecutionState(ES_CONTINUOUS)
End Sub
End Module