Screen off

Discussion in 'Questions (Windows Mobile)' started by joel2009, May 8, 2009.

  1. joel2009

    joel2009 Member Licensed User

    Anyone know how to call screen off or "sleep" on the ppc?
     
  2. Pachuquin

    Pachuquin Member Licensed User

    Hi joel2009

    Here you are a simple library to suspend your ppc.

    Simply, call "Suspend" method.

    Best Regards
     

    Attached Files:

  3. Ida

    Ida Member Licensed User

    Hello Pachuquin,

     
  4. Cableguy

    Cableguy Expert Licensed User

    Go to "Tools" -> "Components".
    Then locate the .dll file and add it, note that this is a device only dll...
    After this go to "Tools" -> " Add Object"
    An object called "pachPower" show be shown...
    select it and insert a name to use it in b4p enviroment..

    In your code you will first have to initialize the dll component..

    Imagine that you nemed the object as "Power"...
    Typing "Power." will sho the available method for the dll, and a "new" method should be present...
    This is the initialization method..

    "Power.new"

    Then, anywere on your code, inside the same module, you can call any other method from the dll...

    the available methods are:

    SoftReset() Will soft reset the device
    PowerOn() Will turn the device ON
    PowerOff() Will turn the device OFF
    PowerSuspend() Will put the device in Suspend mode


    Hope this helps
     
  5. joel2009

    joel2009 Member Licensed User

    thanks Pach :D
     
  6. Ida

    Ida Member Licensed User

    @Paulo:
    thank you for your help!

    I do this -ok.

    [/QUOTE]
    After this go to "Tools" -> " Add Object"
    An object called "pachPower" show be shown...
    [/QUOTE]

    "Add Object" is grey and I cannot select it.

    [/QUOTE]
    select it and insert a name to use it in b4p enviroment..

    In your code you will first have to initialize the dll component..

    Imagine that you nemed the object as "Power"...
    Typing "Power." will sho the available method for the dll, and a "new" method should be present...
    This is the initialization method..

    "Power.new"

    Then, anywere on your code, inside the same module, you can call any other method from the dll...

    the available methods are:

    SoftReset() Will soft reset the device
    PowerOn() Will turn the device ON
    PowerOff() Will turn the device OFF
    PowerSuspend() Will put the device in Suspend mode


    Hope this helps[/QUOTE]

    The other points I cannot do so.

    What's wrong at my program?

    Please excuse my questions!

    Ida:sign0085:
     
  7. agraham

    agraham Expert Licensed User

    Even though the dll only works on the device it will need adding to the desktop as well in order for the IDE to be able to see the objects inside it. This is the reason that, for example, the Hardware and Outlook libraries have desktop dummy equivalents that (mainly) do nothing but do have the same objects and methods so that the IDE and the optimising compiler know about them.
     
  8. Ida

    Ida Member Licensed User

    @Agraham

    Even though the dll only works on the device it will need adding to the desktop as well in order for the IDE to be able to see the objects inside it. This is the reason that, for example, the Hardware and Outlook libraries have desktop dummy equivalents that (mainly) do nothing but do have the same objects and methods so that the IDE and the optimising compiler know about them.[/QUOTE]


    thank you very much for your help!
    I have explore many hours. but nothing helps, but after I take pachpower also to Desktop ( like you write), now "Add Object" is not grey and I can take it.
    Thank you very much. I was so irritated.

    Ida
     
    Last edited: May 12, 2009
  9. Ida

    Ida Member Licensed User

    @Pachuquin:
    Thank you for your nice dll!
    What's the difference between PowerSuspend and PowerOff?

    @Paulo and @Andrew:

    Thank you for your helping! Now I have make a little sample.
    It's all ok?

    Ida
     

    Attached Files:

  10. Ida

    Ida Member Licensed User

    Nobody can help me?
     
  11. eww245

    eww245 Member Licensed User

    I haven't tried this yet but PowerOn??

    Does this library allow for unattended mode.

    I'm just a bit confused on how it will turn on the device.
     
  12. Zenerdiode

    Zenerdiode Active Member Licensed User

    As 'devices' were essentially PDAs (before the OS was ported to telephones) they would switch on when an alarm was due. This library is exploiting that as it places a switch-on event on the notification queue. When off, the device isn't really off, just puts the CPU to sleep and can be prodded into action again from the Power button or the Notification queue.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice