Check if PC is in sleep mode


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Check if PC is in sleep mode

  1. #1
    Join Date
    Apr 2009
    Posts
    10

    Check if PC is in sleep mode

    ello frnds,i want to check if the computer is in sleep mode or not...Suppose my project is in normal state..I change the state to sleep mode,I want that now when the computer wakes from sleep mode,I want that my project is in minimized state..How to check dat?

    Code:
    Imports Microsoft.Win32
    
    Public Class Form1
        Public Sub New()
            MyBase.New()
    
    
            InitializeComponent()
            AddHandler SystemEvents.PowerModeChanged, _
            AddressOf SystemEvents_PowerModeChanged
    
        End Sub
    
        Private Sub SystemEvents_PowerModeChanged( _
        ByVal sender As Object, _
        ByVal e As PowerModeChangedEventArgs)
            MsgBox(e.Mode.ToString())
        End Sub
    
    End Class
    BUt event SystemEvents_PowerModeChange is not fire when i change the mode..can somebody help me?

  2. #2
    Join Date
    May 2004
    Location
    Duluth MN
    Posts
    353
    I believe they answered your question in this thread

    http://www.codeguru.com/forum/showthread.php?p=1864389

    ...joe

  3. #3
    Join Date
    Apr 2009
    Posts
    10
    yes frnd...

Similar Threads

  1. conditional check in oracle
    By rahulvasanth in forum Database
    Replies: 1
    Last Post: 01-26-2006, 10:48 PM
  2. Spell check
    By borgfabr in forum .NET
    Replies: 0
    Last Post: 05-20-2005, 04:35 AM
  3. Check box isssue when bound to a database column
    By Narayan in forum VB Classic
    Replies: 0
    Last Post: 04-10-2001, 10:30 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center