simple question about backlight

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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...
 
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
 
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
 
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...
 
If you raise your notification using SHNotificationAdd you can pass a flag
to force the screen on. But you'll need to P/Invoke the native APIs because
the managed Microsoft.WindowsCE.Forms.Notification class doesn't support
this flag.

Peter
 
i am sorry but ... what is the function of SHNotificationAdd ? i have
quicgly searched but i don't think many information...

I'll continue my serach tomorrow, now i have to go home...here in Italy is
20:00,

i hope i can tell with you also tomorrow, thanks..
 
hi all so i am here again...
i don't have found how i can use the notification...
but i have tried this:
i call the setPowerrequirement to wake up the screen
i change the batterytimeout value in the registry from 0 (setting by
setpowerrequirement) to 0x1E the hex for 30 sec
i flush the value in the key

in this way the time out is set an other time to 30 sec but it seems that
the OS recognize the change only when i close my application...

so i call a releasePowerRequirement to the handle of the set power requirement
and then i call a SystemIdleTimerReset

in this way the change of the batterty timeout in the registry is recognized
by the OS without closing the application..

i don't know why i need the last 2 call but all seems to run...hope this
would be useful for someone
if you have any suggest i am here
 
Back
Top