Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Mobile Development
  3. Mobile
  4. SHDeviceLockAndPrompt problems

SHDeviceLockAndPrompt problems

Scheduled Pinned Locked Moved Mobile
csharpvisual-studiodesign
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Paulo Mitchell
    wrote on last edited by
    #1

    WM 6.0 Pocket PC C# Visual Studio 2008 I have been trying to get the above command to work in order that I can allow the user to lock the device and stick it in his pocket between jobs without it bumping around and entering spurious data. The instructions seem quite striahtforward and I have followed them. Declare as ...... [DllImport("aygshell.dll")] public extern static IntPtr SHDeviceLockAndPrompt(); and call it with.... IntPtr hresult=SHDeviceLockAndPrompt(); When I run the code I get a 0 return but nothing happens. I have signed the app and I don't get any errors or prompts on the PDA when executing. I can use the lock functionality on the PDA directly and it is fine. I have no passwords set up. I have a few questions: 1. Does anybody have any idea what I may be doing wrong 2. Does anybody know what should happen. I added a button to one of the forms (launched by another form) in my app and used the on_click event to make the function call. I am trying to picture what should happen to the UI. 3. Assuming that I can't get this to work, does anybody have any suggestions as to how I can disable/enable the app quickly and easliy by the user. I realise that the user could just put the forms into the background and click the WM Lock button but I really need a single click solution. Thanks

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups