Controlling the Monitor or Graphic Cards...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Ali Rizwan
    Banned
    Contributor
    • Aug 2007
    • 931

    Controlling the Monitor or Graphic Cards...

    Hi all,
    I don know how windows turn monitor or harddisk off??? I want to add same feature in my app so that my app can be a power saving app for laptops. I want to use different poweschemes as we do in Explorer.

    Bytheway is this controlled by the explorere or by any service???
    I think it is controlled by explorer... Plz correct me if i m wrong. Other wise i dont need to add this feature.....

    Thanx
    >> ALI <<
  • shuvo2k6
    New Member
    • Jan 2008
    • 68

    #2
    Originally posted by Ali Rizwan
    Hi all,
    I don know how windows turn monitor or harddisk off??? I want to add same feature in my app so that my app can be a power saving app for laptops. I want to use different poweschemes as we do in Explorer.

    Bytheway is this controlled by the explorere or by any service???
    I think it is controlled by explorer... Plz correct me if i m wrong. Other wise i dont need to add this feature.....

    Thanx
    >> ALI <<

    i am also confused, u can try by this code

    Code:
    Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Any) As Long
    Const SC_MONITORPOWER = &HF170&
    Const MON_OFF = 2&
    Const WM_SYSCOMMAND = &H112
    
    Private Sub Form_Load() 
    SendMessage Me.hWnd, WM_SYSCOMMAND, SC_MONITORPOWER, MON_OFF
    End Sub

    Comment

    Working...