Log in

View Full Version : How to set the time to turn OFF the Backlight of the PDA


Prashant Rana
05-09-2005, 10:31 AM
Hi All,

I want to programmatically set the time uptill which if no action is performed on the PDA the backlight of the PDA should turn OFF.

I am using .NET to develop the application.

I am not able to find any way for doing the same.

Please help me out of this problem.

Thanks In Advance
Prashant N.Rana

Darius Wey
05-09-2005, 10:39 AM
I want to programmatically set the time uptill which if no action is performed on the PDA the backlight of the PDA should turn OFF.

Hmm, what platform are you targeting?

Almost all of the current devices perform this function already. If you tap on Start > Settings > Backlight (in the System tab), there's an option there for turning off the backlight if the device has not been used for a certain amount of time (ranging from ten seconds to five minutes).

Or are you looking for a way to set it outside of the presets?

Prashant Rana
05-09-2005, 10:49 AM
Thanks a lot Darius for the immediate response.

Well, the platform that I am targeting is Windows CE. The Pocket PC is HP iPAQ 4700. I am using C#.NET.

Yes, I am trying to set it outside of the presets, that too programmatically.

Thanks a lot in advance.
Prashant N.Rana

Darius Wey
05-09-2005, 11:07 AM
Yes, I am trying to set it outside of the presets, that too programmatically.

This isn't something you need to program. It's a registry setting.

Navigate to HKCU\ControlPanel\Backlight and there you will see two values: ACTimeout and BatteryTimeout. Those two control the backlight timeout value when the Pocket PC is running off AC and the battery respectively.

Simply change the decimal value to the number of your choice. It works off seconds, so for example, if you want your battery timeout to be 15 seconds, set the decimal value of BatteryTimeout to 15.

Now if you wanted to create a mini-program to do this without having to delve into the registry, then that's another idea. You'd only need to create a couple of fields and have it linked to these particular values in the registry.

Prashant Rana
05-09-2005, 11:28 AM
Thanks Darius,

It would be of great help if you could tell me the method in which I can access the registry settings of the Pocket PC.

And also the method by which I can edit those settings programmatically using C#.Net.

Thanks a lot in advance.
Prashant N.Rana

Darius Wey
05-09-2005, 11:35 AM
Thanks Darius, it would be of great help if you could tell me the method in which I can access the registry settings of the Pocket PC.

Download a copy of PHM Registry Editor from here (http://www.phm.lu/Products/PocketPC/RegEdit/). Once you've installed it, you can navigate to HKCU\ControlPanel\Backlight (as I mentioned earlier) and from there, you'll be able to change those values.

And also the method by which I can edit those settings programmatically using C#.Net.

Unfortunately, I haven't even had the time to pick up C# so I'm afraid I can't help you out with that one.

surur
05-09-2005, 12:26 PM
Hey, thats a very useful trick. Does this mean it can be set outside of the rigid options available e.g. 45 seconds instead of one minute?

Surur

Prashant Rana
05-09-2005, 12:34 PM
Thanks Darius,

I downloaded the PHM Registry Editor and installed on the Pocket PC, but I was not able to change the values that you had mentioned.

In the Registry Editor I navigated through:

HKEY_LOCAL_MACHINE > CONTROLPANEL > BACKLIGHT

But it only shows one parameter named "Redirect" the value of which is "\Windows\Backlight.exe".

I am using Pocket PC 2003 iPaQ 4700.

Please let me know how to set the time.

Thanks a lot in advance.
Prashant N.Rana

Darius Wey
05-09-2005, 12:41 PM
Hey, thats a very useful trick. Does this mean it can be set outside of the rigid options available e.g. 45 seconds instead of one minute?

Sure can! You'll need to exit out of the registry editor before you see the effects.

Darius Wey
05-09-2005, 12:42 PM
In the Registry Editor I navigated through:

HKEY_LOCAL_MACHINE > CONTROLPANEL > BACKLIGHT

No, you want to navigate to HKEY_CURRENT_USER\ControlPanel\Backlight. You'll see the values in there.

Prashant Rana
05-09-2005, 01:15 PM
Thanks a lot Darius.

I was successfully able to set the value of the BatteryTimeout parameter to my desired value.

Thanks a lot to you for the same.

I was even able to do the same programmatically.

Thanks a lot once again.

Best Regards,
Prashant N.Rana

Darius Wey
05-09-2005, 01:19 PM
Thanks a lot Darius.

You're welcome. As always, happy to help. :)