建议各位富翁:(0分)

  • 主题发起人 主题发起人 devecom
  • 开始时间 开始时间
D

devecom

Unregistered / Unconfirmed
GUEST, unregistred user!
建议大家:
如果是一些windows SDK的问题,尽量去参考msdn,没装就到microsoft站点上去查,
别看delphi自带的,老得掉牙,这是我昨天遇到的一个问题,害惨了我:
问题是关闭监视器,我通过发送windows message,SendMessage(Application.Handle,WM_
SysCommand,SC_MONITORPOWER..)的方法,查了一下delphi help:
SC_MONITORPOWER Windows 95 only:
Sets the state of the display. This command supports devices that
have power-saving features, such as a battery-powered personal computer.
上面说windows 95 only,我就放弃了这个方法.苦苦得找其他方法,没找到
今天去查msdn, http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wceui40/htm/cerefWM_SYSCOMMAND.asp
上面才是正确的:
SC_MONITORPOWER
Sets the state of the display. This command supports devices that have power-saving features, such as a battery-powered personal computer.
The lParam parameter can have the following values:
1 - the display is going to low power
2 - the display is being shut off
可见,最新的msdn并没有限制win95,我试了一下,确实是这样。
提醒一下大家而已,没分:) ^_^
 
接受答案了.
 

Similar threads

I
回复
0
查看
3K
import
I
I
回复
0
查看
3K
import
I
I
回复
0
查看
3K
import
I
I
回复
0
查看
1K
import
I
I
回复
0
查看
2K
import
I
后退
顶部