|
Posted by Yoshitha on September 5, 2006, 6:03 pm
Please log in for more thread options
Through my application i'm recording voice (app will run in
smartphone 2005 device), for this first i'm selecting the
hard button which enables the voice recording.
for eg if i select 2 in the device and select done button
then i'm registring this hard button in order to record the
voice.
so after pressing done button if i press 2 then it is
starting the recording. If i cancle the recording( means
clicking on cancel button provided by us) then the
application is completly exitting form device and we wrote
code to unregister that key (for eg unregistering the hard
button 2 so it wont record the voice when user presses 2
after exiting the application)
its working perfectly but whats the problem is, after
exiting from the application if i click 2 then it has to
disaply 2 on the screen but instead of displaying 2 it is
doing nothing, so it is misssing its original functionality.
I hope you got what i said.
Here is my code to register and unregister the button (for
ex for button 2 )
public void RegisterKey()
{
UnregisterFunc1(MOD_KEYUP,50);
RegisterHotKey(this.Hwnd,50,MOD_KEYUP,50);
}
public void UnregisterKey()
{
UnregisterFunc1(MOD_KEYUP, 50);
}
[DllImport("coredll.dll")]
protected static extern uint RegisterHotKey(IntPtr hWnd,
int id, uint fsModifiers, uint vk);
[DllImport("coredll.dll")]
protected static extern uint UnregisterFunc1(uint
fsModifiers, int id);
[DllImport("coredll.dll")]
protected static extern short GetAsyncKeyState(int
vKey);
So can anyone tell me how to solve this problem.
Its veru urgent for me.
Thanx in advance
Tulasi
|