Question

I'm developing my first application to MC9596 mobile device (OS: Windows Mobile 6.5). The goal is to create an application in 'kiosk mode', that means user can only use this application on mobile device and nothing more. It is not allowed to run other application nor change windows settings. I was able to hide windows button and upper status bar (if somebody will be interested, I will post it) and of course it is not a problem to run application maximized on top. What giving me nights without sleep is hardware button on the scanner. Below the display there is a greeen and red button on the sides. Whatever I do, after pressing the green one phone is displayed together with windows button. And after pressing windows button you just got access everywhere.

I tried following solutions found while googling: Changing registry under HKEY_LOCAL_MACHINE\Software\Symbol\ProgrammableKeys or HKEY_LOCAL_MACHINE\Software\Microsoft\Shell\Keys

and tried to use UnregisterFunc1 in coredll.dll.

Unfortunately neither helped.

I have no problem with changing registry settings or using external dll-s, just need to find a solution. I am already overdue with this task and just spent 3 days trying to find a solution for this problem.

Thank you in advance for any help!

Était-ce utile?

La solution

Well, my collegue accidentally helped me with this problems, so finally the solution is:

[DllImport("coredll.dll", SetLastError = true)] static extern bool
AllKeys(bool bAllKeys);

Than just call:

AllKeys(true);

According to blogs.windows.com:

This function allows your programs to request that all key presses be sent directly to the requesting application. Normally some buttons are intercepted by the operating system for its own use, but games and input - intensive applications may want access to these buttons for their own use.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top