By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,952 Members | 959 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,952 IT Pros & Developers. It's quick & easy.

Controlling the Monitor or Graphic Cards...

Ali Rizwan
100+
P: 927
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 <<
May 14 '08 #1
Share this Question
Share on Google+
1 Reply


P: 68
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

Expand|Select|Wrap|Line Numbers
  1.  
  2. 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
  3. Const SC_MONITORPOWER = &HF170&
  4. Const MON_OFF = 2&
  5. Const WM_SYSCOMMAND = &H112
  6.  
  7. Private Sub Form_Load() 
  8. SendMessage Me.hWnd, WM_SYSCOMMAND, SC_MONITORPOWER, MON_OFF
  9. End Sub
  10.  
  11.  
May 15 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.