Intercepting key events in Pocket PC WM6 - Windows Mobile Development and Hacking General

Hi all!!
Does someone know how trap/intercept key event (greeen, red, volume and all others buttons) to prevent windows executing associated tasks?
That is: i want to prevent my apllication to minimize if i press red button.
Ideas?
Code?
Thanx

What programming language do you use?

Related

Power on when opening keyboard

Does anyone know if there exists a tweak to power on my wizard when I open my keyboard?
My power button does'nt work anymore and i have to remove each time my sd-card to power on my wizard. Does anyone has another suggestion?
Thanks
Hi!
Try Settings->buttons->locks (don't know the exact menu items' name, as my device is in german - but should be close :wink: )
You can set other buttons (i.e. messaging) to be able to power on your device.
Brevi

Button 4 mapping problem (press & hold)

Hi!
I have a problem with mapping hard button #4 on my universal.
In Settings -> Buttons, I have Button 4 Press mapped to Voice Speed Dial,
and Button 4 Press & Hold mapped to Voice Recorder. But when I press
this button, always Voice Recorder will start - even if I tab this button for a short time,
or when I hold this button for 5-10 seconds... Always Voice Recorder
will run...
I have tried to change this mapping to other commands, but always taping this
button will start the command from Button 4 Press & Hold assigment...
Indeed you are right. This problem persisted even in the Helmi WM5 aku3.5 ROMs.
same problem here
The only solution I applied was using another application to assign the button presses to launch different applications. I use AE Button Plus: http://www.pocketgear.com/software_detail.asp?id=21070
But first I renamed "Button 4" to be "Press and Hold", and renamed "Press and Hold" to be "Button 4", since this is the button that is able to launch applications. I then use AE Button Plus to map the button assignments. There is also a freeware button mapper called PQZ: http://www.nicque.com/PQz/ Some say, PQZ is better, but I have not tried it myself, so I can't comment.
I have founded that problem is with MS Voice Command.
Before installing MS Voice Command, I was able to asign commands
to "press" and "press & hold" mapping. After installing MS Voice Command,
only to "press & hold" (works like simple "press")... Unfortunately,
uninstalling MS Voice Command didn't solve problem... But registry restore
from backup fixed that issue !!
So this problem seats in registry after installing MS Vocie Command...
Have anyone some idea what key couses that problem?
Maybe I will try to find solution, but I need an apliaction that can
check all modification in registry after installing some software...
Does anyone knows such software?
Mr Groch said:
Maybe I will try to find solution, but I need an apliaction that can
check all modification in registry after installing some software...
Does anyone knows such software?
Click to expand...
Click to collapse
SKTracker does exactly that quite convenient (14 days trial).
http://s-k-tools.com/index.html?sktracker/m_feat.html
Basically you could as well diff two registry exports, with VoiceCommand and after your restore.
(For this you may want to look at s-k-tools freeware as well...)
You can use SSNAP utility (from SK too) instead of sktracker. It does snapshots the register and keeps them in a plain txt-file. Then it is possible to compare two snapshots by using IDIFF utility (from SK too) on your PPC or by using fc.exe on your windows desktop computer.
You can find the above described utilities here http://s-k-tools.com/index.html?m_util.html

Kiosk mode & some questions

Hi,
my application on Windows Mobile 5.0 shall run in kiosk mode. Therefore, I've disabled the TaskBar and did some other stuff. Basically, it works great, but I'm still having a few problems:
1. When I hide the taskbar, also the "OK" Button which is needed by some dialogs gets hidden. Therefore, when the user e.g. wants to change communication/GPRS settings, there is no way to accept the changes or close the regarding dialogs. (I have to use these sort of things provided by the operating system - thus, the OS is not entirely hidden).
Is there any possibility to simulate the TaskBar's OK button within my own application? (E.g., by sending a certain Windows-Message indicating the OK-Button pressed?)
Or, alternatively, is it possible to just hide some parts of the TaskBar (e.g., the Start Button) and keep the OK button, clock, and GSM status visible??
2. Somestimes, there appears a system-notification window, e.g. notifying the user about establishing a GPRS connection, or regarding failures. Is it possible to intercept these dialogs and to hide them, or just to disable them such that the user can see it, but tapping the "Cancel" or "Settings" button won't cause any action?
I'm working with Visual Studio 2005/windows Mobile 5.0 SDK in visual c++ and I'm using the HTC ARTEMIS device
Kind regards,
Günther
1. You can send WM_COMMAND with wParam = IDOK.
It must work, because it's how app handle it!
Is there anything I have to consider when sending WM_COMMAND system-wide? A simple PostMessage(NULL, WM_COMMAND,...) seems not to work. Do you see any possibility to get a Windows handle to the active application that should receive the WM_COMMAND message?
Or do you have any idea how applications tell the TaskBar to show the OK or Cancel button? I think this happens via system-wide windows messages, doesn't it? But which messages, and how to intercept them???
Any help is still highly apprechiated (it seems that nobody else did ever have this problem, also in various fora I couldn't yet get an answer... )
I have the same problem with the ok buttom. My PDA have 1 buttom for the camera, so I use this buttom like an OK buttom, for now.
But I´m still trying to make the ok buttom be operacional on the blocked taskbar.

HButton for smartphone

Hi,
I created HButton for smartphones. BUT I have no smartphone so I developed it on smartphone emulator.
I will be very gladly, if there is someone who can test it.
Please note: Test it on your own risk - never been run on real smartphone.
thanks
Hundera
Great! While I have no time to test it right now, I'll frontpage the news if it turns out to be working!
when i get to the assign window, i get stuck there, don't know what's the next step
oldsap said:
when i get to the assign window, i get stuck there, don't know what's the next step
Click to expand...
Click to collapse
Hi,
I created it little messy. It has to be changed before official release.
* Using * assign it to any HW button. I don't know if there will be name and icon of selected button or just something like "unknown 40C1".
* Create list of applciations
* Left and right button select preferred application​* enter to add it to list​* Press OK.
thats all. Now you should be able to start application using HButton....
What now?
I managed to do almost everything:
I assigned applications to the list of button1,
I clicked on '*', and so
Assigned to (*) displays "Unknown 40C1"
When I run the application Button1 manually, the application I chose for Button1 is run.
But what now? What do I have to press to make the application run? What is button1? I tried all buttons, pressing for various lengths of time, but I can't get it to run.
Do I need to edit the registry so that the application "Button1" is assigned to some button?
Hi,
at first thanks for help.
"Unknown 40C1" means - there are registry part about this button. In SPh, there's missing names of buttons - so name is unknown.
I has no SPh, only emulator. I checked registry and there is all ok - only names are missing. All flags and path to applications that should be started are similar to pocketpc.
These registry settings are altered by my program so HButton1 should be started by button with code "40C1". What button it is - I really don't know. That's what I need to test.
But as you describe it, it looks like that these settings are ignored.... So Where is settings of button's behavior on smartphone?!?!
ghostwheel said:
I managed to do almost everything:
I assigned applications to the list of button1,
I clicked on '*', and so
Assigned to (*) displays "Unknown 40C1"
When I run the application Button1 manually, the application I chose for Button1 is run.
But what now? What do I have to press to make the application run? What is button1? I tried all buttons, pressing for various lengths of time, but I can't get it to run.
Do I need to edit the registry so that the application "Button1" is assigned to some button?
Click to expand...
Click to collapse
not totally sure
I'm no expert in this.
If I understand correctly, one way to do it is through links in the \windows directory,
so
\windows\short_MSG
is a link to the program called when the message button is pressed
\windows\short_Camera, and short_IE
are for camera and explorer button.
But I think there are also other places to set these. And some phones allow long_MSG,IE,Camera links for long button press - not mine.
I tried to copy the Button1 link to short_MSG, and that managed to run the first command in the list for button1, but not the next on a longer press. (And it still launched the message program first, so there must be a second place that determines what is launched...)
Maybe people in the smartphone forum will have more info...
All this was on an s620 WM6.1
just a few more comments
Now that I can get HButton to partially run, I have a few comments:
I'm not exactly sure why, but going from HBSetup to configure buttons 1 and 2 takes a really long time. HButtonTask is much shorter. Maybe it is because a list of all programs is generated, and this takes time? In any case, maybe one could display a message "please wait..." - the first time I thought the program had crashed.
Pressing left (instead of right) when the bottom selector in HButton1 setup shows <None> crashes the program (ArgumentOutOfRangeException)
In HButtonTask setup there are two arrows below Custom delay (I think to chose the delay), but no number is displayed, and pressing left-right only toggles the boxes.
<Start Menu> doesn't work. <Clock>, <Toggle BT>, <Quit>, <Today> do work. <Back> behaves a bit differently than the Back key - it switches between tasks, instead of screens - but that's ok and can be useful!
In the HButton1/2 setup screens, I would change the left softkey to "save" instead of "ok". Too often I pressed that button instead of the center/enter button to change the action on the list. Because it takes ~10 seconds to enter the screen again, it is quite annoying....
Hi
I am really interested in this project if is still under developement

How to capture turn off button event on windows mobile?

I need to capture the turn off button event on a windows mobile device but I don't know if is it possible. Is there any register key to get it? My program is on c++.
Any clue?
Cheers

Categories

Resources