Pocket PC 4.20 Backlight

C

Crysal

Hi, I try to change the brightness of the Pocket PC with the .NET
Compact Framework 2.0. But nothing works. Anybody ideas? Thx Thorsten
 
P

Peter Foot [MVP]

The implementation of brightness is hardware specific. Generally you have to
modify a registry setting and then communicate with the system to refresh,
either via a WM_SETTINGCHANGED message or by signalling a named event (often
SDKBackLightChangeEvent or BacklightChangeEvent)

Peter
 
C

Crysal

Thanks, this is my code:

RegistryKey parent_rk =
Registry.CurrentUser.OpenSubKey("ControlPanel");
RegistryKey child_rk = parent_rk.OpenSubKey("BackLight");

There ist a "dword value" called "Brightness", but its not included in
the child_rk-object.
How can I modify the dword now.

Sorry for my bad english ...
 
P

Peter Foot [MVP]

You can retrieve a value from a RegistryKey using the GetValue method e.g.
int brightness = (int)child_rk.GetValue("Brightness");

Peter
 
C

Crysal

Thanks Peter, it runs.
I must implement an Event-Class too, this class handles the event for
the modify.


Thorsten
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top