.NET and related technologies

Do you use your computer for playback of films, streamed TV etc. before going to sleep?

In these cases, your computers sleep functionality is suspended whilst the video is in playback.

Sleep# sends your computer to sleep after the playback of full-screen video, providing Windows has been idle for a predefined amount of time.

There is a grace period at the end of the full-screen video before sending your computer to sleep, allowing you to interrupt the process should you still be awake.

For this to work, after the video has played back, the video player should leave full-screen. VLC media player does this, as does BBC iPlayer among others. Please let me know your experiences – does it work for you?

Sleep# can be downloaded from http://sourceforge.net/projects/sleepsharp/.


Comments on: "Sleep# – send your computer to sleep after VLC playback" (10)

  1. I can confirm that Sleep# works with Windows Media Player, at least under Windows 7 x64.

  2. My computer does this without this additional software, I always thought it was some kind of fault within windows that allowed the sleep timer to continue during playback. I must point out that it never does it during a video only once its finished even if it remains full screen. I normally get about 2 mins to use the computer which stops this happening. It happens with cyberlink powerdvd, vlc player, bbci, 4od and YouTube, have not used anything else to play video so cannot comment on any other situation such as itv player etc.

    I built the computer myself running Windows 7×64, My spec is as follows:
    AMD Phenom x6 1100T Black (NOT Overclocked)
    ASUSTeK M4A88TD-V EVO/USB3 (AM3) Motherboard
    ASUS EAH6850 Series Graphics Card, based on the ATI Radeon 6850-overclocked by Asus
    12GB Corsair Vengeance RAM 3x4GB

    All other spec is irrelevant but just in case it helps my idle temps are
    CPU 22-25 C
    GPU 34-36 C
    Board (System) about 33 C

    I use ASUS Cool & Quiet and FanXPert but it was happening before I started using this software and have always kept my drivers up-to-date with no change.

    Power Management is set to Balanced (for Cool & Quiet to work) with Monitor set to 10mins and sleep to 30mins, hibernation and HDD Spin down is off.

    Any explanation or advice would be helpful, it has it good points if I fall asleep but is annoying if I getup and leave the computer for a while forgetting to nudge the mouse or something, PC resumes from sleep without issue in under 2 seconds.


  3. That’s strange, I’ll have to try to replicate that. Windows screensaver is refusing to kick in at all at the moment. What happens when you change the sleep timer to something longer, like 4 hours? Does the behaviour change then?

  4. Did you ever get to the bottom of this Shane?

  5. Hi Chris,

    Maybe you can help me. Do you know how possible to check the display status in csharp?

    Thank you

  6. Hi,

    the powermanagement turn off the monitor after 2 minutes(so the monitor in standby).
    (on win 8.1)

    Is it possible to check somehow is te monitor in standby?

    I have found this: GUID_CONSOLE_DISPLAY_STATE
    but I am just a beginner, I never used any unmanaged code before.


  7. The power setting GUID notifications (e.g. GUID_CONSOLE_DISPLAY_STATE) would allow you to register and listen for events e.g. the screen dimming, turning off, or turning on. Is this what you want? Or do you just want to check if the screen is on or off at a particular time?

    To listen for the power setting GUID notifications, you’ll first need to call RegisterPowerSettingNotification. To do this in .NET you’ll need to use pinvoke. See http://www.pinvoke.net/default.aspx/user32/registerpowersettingnotification.html.

    Next you’ll need to override WndProc on your form (or equivalent):

    protected override void WndProc(ref Message message)
    if (message.Msg == WM_POWERBROADCAST && message.WParam.ToInt32() == PBT_POWERSETTINGCHANGE)
    // Do something with message.LParam (of type struct POWERBROADCAST_SETTING)

    base.WndProc(ref message);

    See http://msdn.microsoft.com/en-us/library/windows/desktop/aa373195(v=vs.85).aspx and

    Hope this helps, let me know how you get on/if you need any further help:)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: