自从我使用外部监视器我的笔记本电脑,当我需要改变背光亮度一直是我必须按下显示器上的按钮,通过它的菜单导航和调节亮度.
这真是一种痛苦.按键太多了!当我使用笔记本电脑的集成显示器时,就像Fn按键和组合一样简单.
可能有些人可能认为不可能以编程方式更改它.我也这么认为.但我刚刚在我的视频卡配置中找到了一个控件(一个GUI控件).
因此,这证明可以通过编程方式更改此设置.
但我找不到任何工具或实用程序.我发现的所有功能都是调整伽玛,亮度和对比度的工具.但背光亮度是另一回事.
你们中的任何人都知道如何在Windows中以编程方式调整那该死的东西吗?
在基于CE的Windows Mobile中,您可以使用SetPowerRequirement和ReleasePowerRequirement API 来防止屏幕背光超时,如下所示:
IntPtr handle = SetPowerRequirement("BKL1:", PowerState.FULL, 1, IntPtr.Zero, 0);
// screen won't timeout while you do stuff in here
ReleasePowerREquirement(handle);
Run Code Online (Sandbox Code Playgroud)
在WP7上有类似的事情吗?
我四处寻找一种在iPhone上的应用程序中设置背光级别的方法.我在这里找到了解决方案:
http://www.iphonedevsdk.com/forum/29097-post3.html
我遇到的问题是,当我将其添加到我的应用程序时,我收到错误和警告.我的代码如下:
#include "GraphicsServices.h"
- (void) viewWillAppear:(BOOL)animated
{
NSNumber *bl = (NSNumber*) CFPreferencesCopyAppValue(CFSTR("SBBacklightLevel" ), CFSTR("com.apple.springboard"));
previousBacklightLevel = [bl floatValue];
//Error here : incompatible types in assignment
[bl release];
GSEventSetBacklightLevel(0.5f);
// Warning here : implicit declaration of function 'GSEventSetBacklightLevel'
}
//...The rest of my app
- (void)applicationWillTerminate:(UIApplication *)TheNameOfMyAppIsHere
{
GSEventSetBacklightLevel(previousBacklightLevel);
}
Run Code Online (Sandbox Code Playgroud)
我不确定是什么导致了这一点.我也不知道我的.h文件中需要什么,但我有:
NSNumber *previousBacklightLevel;
Run Code Online (Sandbox Code Playgroud)
编辑//改变了
NSNumber *previousBacklightLevel
Run Code Online (Sandbox Code Playgroud)
至
float previousBacklightLevel;
Run Code Online (Sandbox Code Playgroud)
如建议的那样,这对分配错误中的不兼容类型进行了排序.
现在留下:
"_GSEventSetBacklightLevel",引自:
- MyAppViewController.o中的[MyAppViewController viewWillAppear:]
- MyAppViewController.o中的[MyAppViewController applicationWillTerminate]
符号未找到
collect2:ld返回1退出状态
不知道怎么解决这个问题!
任何帮助,将不胜感激,
//编辑
所有问题排序.感谢所有帮助过我的人.我真的很感激它,不能等到我能回答一些问题.
非常感谢,
斯图