From: AliR on
Hi Everyone,

Does anyone know how to keep the pocketpc from auto dimming the backlight.
My program displays a presentation type thing, and don't want the backlight
to go out while the presentation is running.

Thanks
AliR.


From: Charles Schweizer [MSFT] on
I don't know if this applies to the specific dimming feature you refer to,
but you could try SystemIdleTimerReset:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wceshellui5/html/wce50lrfSystemIdleTimerReset.asp

This API is used to prevent the device fom falling asleep. It may or may
not also help keep the screen at full brightness.

--
This posting is provided "AS IS" with no warranties, and confers no rights.

Charles Schweizer [MSFT]
cschweiz(a)online.microsoft.com
Remove "online" if you're not an e-mail harvester...
-----------------------------

"AliR" <AliR(a)newsgroup.nospam> wrote in message
news:%SNMd.32149$iC4.14945(a)newssvr30.news.prodigy.com...
> Hi Everyone,
>
> Does anyone know how to keep the pocketpc from auto dimming the backlight.
> My program displays a presentation type thing, and don't want the
> backlight
> to go out while the presentation is running.
>
> Thanks
> AliR.
>
>


From: AliR on
I am trying to keep the backlight from turning off, not the device falling
asleep. I am keeping the device awake by using SystemIdleTimerReset() but
the back light turns off. I found a post in here about chaning the
backlight settings but it only applied to HP/Compaq devices.

Does anyone know how to turn the backlight on demand?

AliR.


"Charles Schweizer [MSFT]" <cschweiz(a)online.microsoft.com> wrote in message
news:e5VlsevCFHA.520(a)TK2MSFTNGP09.phx.gbl...
> I don't know if this applies to the specific dimming feature you refer to,
> but you could try SystemIdleTimerReset:
>
>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wceshellui5/html/wce50lrfSystemIdleTimerReset.asp
>
> This API is used to prevent the device fom falling asleep. It may or may
> not also help keep the screen at full brightness.
>
> --
> This posting is provided "AS IS" with no warranties, and confers no
rights.
>
> Charles Schweizer [MSFT]
> cschweiz(a)online.microsoft.com
> Remove "online" if you're not an e-mail harvester...
> -----------------------------
>
> "AliR" <AliR(a)newsgroup.nospam> wrote in message
> news:%SNMd.32149$iC4.14945(a)newssvr30.news.prodigy.com...
> > Hi Everyone,
> >
> > Does anyone know how to keep the pocketpc from auto dimming the
backlight.
> > My program displays a presentation type thing, and don't want the
> > backlight
> > to go out while the presentation is running.
> >
> > Thanks
> > AliR.
> >
> >
>
>


From: Karsten Patzwaldt on
I tried that with the following code snippet:

void GApplication::force_backlight(void)
{
if (m_backlight_handle == INVALID_HANDLE_VALUE)
{
m_backlight_handle = SetPowerRequirement("BKL1:", D0,
POWER_NAME, NULL, 0);
}
}

void GApplication::unforce_backlight(void)
{
if (m_backlight_handle != INVALID_HANDLE_VALUE)
{
ReleasePowerRequirement(m_backlight_handle);
m_backlight_handle = INVALID_HANDLE_VALUE;
}
}

but a) this doesn't work, i.e. backlight still switches off and b) this
makes the application crash after a couple of minutes, but the latter
one is not necessarily SetPowerRequirement()'s fault.

anyways, does anyone have a code snippet that actually does work? i'd be
glad to see one, because the methods described on msdn either don't work
or i simply miss some point.

regards,

karsten

Preet Kamal Singh [MSFT] wrote:
> You can use SetPowerRequirement function to set the requirements for your
> application.
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wceddk5/html/wce50lrfSetPowerRequirement.asp
> However, you should release the power requirements as soon as your app gets
> de-activated. You wouldn't want the backlight to be enabled on even though
> your presentation is not in the foreground.
>
From: Neil on
You need to use different methods depending on which OS your device is
running. The code below should work for Windows Mobile 2003 OS....but won't
have any effect on 2002 OS.

On 2002 OS you need to override the "BatteryTimeout" and "ACTimeout"
registry settings.

"Karsten Patzwaldt" <karsten(a)gate5.de> wrote in message
news:eLXo5gMIFHA.244(a)TK2MSFTNGP10.phx.gbl...
>I tried that with the following code snippet:
>
> void GApplication::force_backlight(void)
> {
> if (m_backlight_handle == INVALID_HANDLE_VALUE)
> {
> m_backlight_handle = SetPowerRequirement("BKL1:", D0, POWER_NAME,
> NULL, 0);
> }
> }
>
> void GApplication::unforce_backlight(void)
> {
> if (m_backlight_handle != INVALID_HANDLE_VALUE)
> {
> ReleasePowerRequirement(m_backlight_handle);
> m_backlight_handle = INVALID_HANDLE_VALUE;
> }
> }
>
> but a) this doesn't work, i.e. backlight still switches off and b) this
> makes the application crash after a couple of minutes, but the latter one
> is not necessarily SetPowerRequirement()'s fault.
>
> anyways, does anyone have a code snippet that actually does work? i'd be
> glad to see one, because the methods described on msdn either don't work
> or i simply miss some point.
>
> regards,
>
> karsten
>
> Preet Kamal Singh [MSFT] wrote:
>> You can use SetPowerRequirement function to set the requirements for your
>> application.
>> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wceddk5/html/wce50lrfSetPowerRequirement.asp
>> However, you should release the power requirements as soon as your app
>> gets
>> de-activated. You wouldn't want the backlight to be enabled on even
>> though
>> your presentation is not in the foreground.
>>