From: bule on
hi all i have this problem...

i have set that my backlight's PDA turn off after 30 sec.

then i have made a simple program wich after 60 sec call the
SetPowerRequirement's API setting the backlight power to full on (device
state =0).

so the behaviour is this :
time 0 start the experiment
time 30 sec the backlight turn off
time 60 sec the backlight turn on

but time 90 sec : the backlight doesn't turn off, it is as the PDA has lost
the information about turning on th light after 30 sec of inactivity

so my question is how can i turn on the light but then make the PDA behave
like before i have call the SetPowerRequirement? i have tried to call the
relasePowerRequirement but if i call this the backlight turn off..

i hope somone can help me...
From: Peter Foot [MVP] on
You'd need to call ReleasePowerRequirement after 30 seconds of calling
SetPowerRequirement. By releasing the power requirement you allow the device
to go back to what it should be doing and it should already be off so it
turns off immediately. An alternative is to use a different method to wake
up the screen and still use the existing timeout method, such as sending
some key input etc

Peter

--
Peter Foot
Device Application Development MVP
www.peterfoot.net | www.inthehand.com

"bule" <bule(a)discussions.microsoft.com> wrote in message
news:96E58D09-E330-427C-9033-A20E5BB03A6E(a)microsoft.com...
> hi all i have this problem...
>
> i have set that my backlight's PDA turn off after 30 sec.
>
> then i have made a simple program wich after 60 sec call the
> SetPowerRequirement's API setting the backlight power to full on (device
> state =0).
>
> so the behaviour is this :
> time 0 start the experiment
> time 30 sec the backlight turn off
> time 60 sec the backlight turn on
>
> but time 90 sec : the backlight doesn't turn off, it is as the PDA has
> lost
> the information about turning on th light after 30 sec of inactivity
>
> so my question is how can i turn on the light but then make the PDA behave
> like before i have call the SetPowerRequirement? i have tried to call the
> relasePowerRequirement but if i call this the backlight turn off..
>
> i hope somone can help me...

From: bule on
thanks for the quickly response...
i'd like to use the existing timeout and so how can i simulate a screen
touch?
is there any API?

thinking about i have also found that after calling the setPowerRequirement
i change the register key HKEY_current_user\\controlPanel\\Backlight
BatteryTimeout from 30 to 0...so if after calling the setPowerrequirement i
change the register key to 30 and then i create a BacklightChangeEvent can i
re-set the previous timeout?

but i think this solution is alittle bit more cumbersone that simulate a
screen touch



"Peter Foot [MVP]" wrote:

> You'd need to call ReleasePowerRequirement after 30 seconds of calling
> SetPowerRequirement. By releasing the power requirement you allow the device
> to go back to what it should be doing and it should already be off so it
> turns off immediately. An alternative is to use a different method to wake
> up the screen and still use the existing timeout method, such as sending
> some key input etc
>
> Peter
>
> --
> Peter Foot
> Device Application Development MVP
> www.peterfoot.net | www.inthehand.com
>
> "bule" <bule(a)discussions.microsoft.com> wrote in message
> news:96E58D09-E330-427C-9033-A20E5BB03A6E(a)microsoft.com...
> > hi all i have this problem...
> >
> > i have set that my backlight's PDA turn off after 30 sec.
> >
> > then i have made a simple program wich after 60 sec call the
> > SetPowerRequirement's API setting the backlight power to full on (device
> > state =0).
> >
> > so the behaviour is this :
> > time 0 start the experiment
> > time 30 sec the backlight turn off
> > time 60 sec the backlight turn on
> >
> > but time 90 sec : the backlight doesn't turn off, it is as the PDA has
> > lost
> > the information about turning on th light after 30 sec of inactivity
> >
> > so my question is how can i turn on the light but then make the PDA behave
> > like before i have call the SetPowerRequirement? i have tried to call the
> > relasePowerRequirement but if i call this the backlight turn off..
> >
> > i hope somone can help me...
>
From: " ctacke/>" on
Use SystemIdleTimerReset


--
Chris Tacke - Embedded MVP
OpenNETCF Consulting
Managed Code in the Embedded World
www.opennetcf.com
--



"bule" <bule(a)discussions.microsoft.com> wrote in message
news:D90A2C2E-7763-4939-B6FF-786DBBBD7259(a)microsoft.com...
> thanks for the quickly response...
> i'd like to use the existing timeout and so how can i simulate a screen
> touch?
> is there any API?
>
> thinking about i have also found that after calling the
> setPowerRequirement
> i change the register key HKEY_current_user\\controlPanel\\Backlight
> BatteryTimeout from 30 to 0...so if after calling the setPowerrequirement
> i
> change the register key to 30 and then i create a BacklightChangeEvent can
> i
> re-set the previous timeout?
>
> but i think this solution is alittle bit more cumbersone that simulate a
> screen touch
>
>
>
> "Peter Foot [MVP]" wrote:
>
>> You'd need to call ReleasePowerRequirement after 30 seconds of calling
>> SetPowerRequirement. By releasing the power requirement you allow the
>> device
>> to go back to what it should be doing and it should already be off so it
>> turns off immediately. An alternative is to use a different method to
>> wake
>> up the screen and still use the existing timeout method, such as sending
>> some key input etc
>>
>> Peter
>>
>> --
>> Peter Foot
>> Device Application Development MVP
>> www.peterfoot.net | www.inthehand.com
>>
>> "bule" <bule(a)discussions.microsoft.com> wrote in message
>> news:96E58D09-E330-427C-9033-A20E5BB03A6E(a)microsoft.com...
>> > hi all i have this problem...
>> >
>> > i have set that my backlight's PDA turn off after 30 sec.
>> >
>> > then i have made a simple program wich after 60 sec call the
>> > SetPowerRequirement's API setting the backlight power to full on
>> > (device
>> > state =0).
>> >
>> > so the behaviour is this :
>> > time 0 start the experiment
>> > time 30 sec the backlight turn off
>> > time 60 sec the backlight turn on
>> >
>> > but time 90 sec : the backlight doesn't turn off, it is as the PDA has
>> > lost
>> > the information about turning on th light after 30 sec of inactivity
>> >
>> > so my question is how can i turn on the light but then make the PDA
>> > behave
>> > like before i have call the SetPowerRequirement? i have tried to call
>> > the
>> > relasePowerRequirement but if i call this the backlight turn off..
>> >
>> > i hope somone can help me...
>>


From: bule on
i have read about the SystemIdleTimerReset
but it will not resolve my problem...
i am searching to turn on light if something happen...i don't want to turn
on light always:
if the light is off and something happens: turn on the light
but if the light is off and nothing happens no problem...

i'd like to have a behaviour as a cell phone : if a message arrive so turn
on the light, if noo message arrives keep the light off...

i halso have tried this to weak up scree :
mouse_event(MOUSEEVENTF.LEFTDOWN|MOUSEEVENTF.ABSOLUTE,61439,1638,0,0);

but no succes i see the tap on the screen but no light...