VS Studio 2005. Pocket PC 2005
I need to capture a talk button press & release when a user presses the talk
button on headset that plugs into stero socket. I then action some code on
the event and also check how long the button was held for.

Any help appreciated


SteveW

Re: Accessing the talk button by Fabien

Fabien
Fri Nov 24 14:48:14 CST 2006

Hi,

You can measure the time between the WM_KEYDOWN and the WM_KEYUP
messages to determine if the key was held down. Then for the talk
button trap the action key VK_TTALK.

BR


Fabien Decret
Windows Embedded Consultant

ADENEO (ADESET)
http://www.adeneo.adetelgroup.com/

Park2 a =E9crit :

> VS Studio 2005. Pocket PC 2005
> I need to capture a talk button press & release when a user presses the t=
alk
> button on headset that plugs into stero socket. I then action some code on
> the event and also check how long the button was held for.
>=20
> Any help appreciated
>=20
>=20
> SteveW


Re: Accessing the talk button by Park2

Park2
Sat Nov 25 07:21:05 CST 2006

Is this the green talk button? If so I am trying to get the talk button that
appears on the wired headset.


Cheers

SteveW




"Fabien" <fab_00_2002@msn.com> wrote in message
news:1164401294.531661.52570@14g2000cws.googlegroups.com...
Hi,

You can measure the time between the WM_KEYDOWN and the WM_KEYUP
messages to determine if the key was held down. Then for the talk
button trap the action key VK_TTALK.

BR


Fabien Decret
Windows Embedded Consultant

ADENEO (ADESET)
http://www.adeneo.adetelgroup.com/

Park2 a écrit :

> VS Studio 2005. Pocket PC 2005
> I need to capture a talk button press & release when a user presses the
> talk
> button on headset that plugs into stero socket. I then action some code on
> the event and also check how long the button was held for.
>
> Any help appreciated
>
>
> SteveW



Re: Accessing the talk button by Park2

Park2
Sat Nov 25 08:04:07 CST 2006


I have added this to new pocket pc 2005 application:
I have added it after:

public Form1()

{

InitializeComponent();

}

Is this correct place . ? This should detect the joypad presses but nothing
happens.


private void Form1_KeyDown(object sender,
System.Windows.Forms.KeyEventArgs e)
{
switch (e.KeyCode)
{
case Keys.Up:
MessageBox.Show("UP key pressed");
break;
case Keys.Down:
MessageBox.Show("DOWN key pressed");
break;
case Keys.Left:
MessageBox.Show("LEFT key pressed");
break;
case Keys.Right:
MessageBox.Show("RIGHT key pressed");
break;
case Keys.Return:
MessageBox.Show("key pressed in");
break;
}
}

news:u9q5RSJEHHA.4620@TK2MSFTNGP04.phx.gbl...
> Is this the green talk button? If so I am trying to get the talk button
> that appears on the wired headset.
>
>
> Cheers
>
> SteveW
>
>
>
>
> "Fabien" <fab_00_2002@msn.com> wrote in message
> news:1164401294.531661.52570@14g2000cws.googlegroups.com...
> Hi,
>
> You can measure the time between the WM_KEYDOWN and the WM_KEYUP
> messages to determine if the key was held down. Then for the talk
> button trap the action key VK_TTALK.
>
> BR
>
>
> Fabien Decret
> Windows Embedded Consultant
>
> ADENEO (ADESET)
> http://www.adeneo.adetelgroup.com/
>
> Park2 a écrit :
>
>> VS Studio 2005. Pocket PC 2005
>> I need to capture a talk button press & release when a user presses the
>> talk
>> button on headset that plugs into stero socket. I then action some code
>> on
>> the event and also check how long the button was held for.
>>
>> Any help appreciated
>>
>>
>> SteveW
>
>



Re: Accessing the talk button by Fabien

Fabien
Sun Nov 26 10:33:56 CST 2006

Hi,

You must set the KeyPreview property of your form to true.
YouForm.KeyPreview =3D true;

BR


Fabien Decret
Windows Embedded Consultant

ADENEO (ADESET)
http://www.adeneo.adetelgroup.com/

Park2 a =E9crit :

> I have added this to new pocket pc 2005 application:
> I have added it after:
>
> public Form1()
>
> {
>
> InitializeComponent();
>
> }
>
> Is this correct place . ? This should detect the joypad presses but nothi=
ng
> happens.
>
>
> private void Form1_KeyDown(object sender,
> System.Windows.Forms.KeyEventArgs e)
> {
> switch (e.KeyCode)
> {
> case Keys.Up:
> MessageBox.Show("UP key pressed");
> break;
> case Keys.Down:
> MessageBox.Show("DOWN key pressed");
> break;
> case Keys.Left:
> MessageBox.Show("LEFT key pressed");
> break;
> case Keys.Right:
> MessageBox.Show("RIGHT key pressed");
> break;
> case Keys.Return:
> MessageBox.Show("key pressed in");
> break;
> }
> }
>
> news:u9q5RSJEHHA.4620@TK2MSFTNGP04.phx.gbl...
> > Is this the green talk button? If so I am trying to get the talk button
> > that appears on the wired headset.
> >
> >
> > Cheers
> >
> > SteveW
> >
> >
> >
> >
> > "Fabien" <fab_00_2002@msn.com> wrote in message
> > news:1164401294.531661.52570@14g2000cws.googlegroups.com...
> > Hi,
> >
> > You can measure the time between the WM_KEYDOWN and the WM_KEYUP
> > messages to determine if the key was held down. Then for the talk
> > button trap the action key VK_TTALK.
> >
> > BR
> >
> >
> > Fabien Decret
> > Windows Embedded Consultant
> >
> > ADENEO (ADESET)
> > http://www.adeneo.adetelgroup.com/
> >
> > Park2 a =E9crit :
> >
> >> VS Studio 2005. Pocket PC 2005
> >> I need to capture a talk button press & release when a user presses the
> >> talk
> >> button on headset that plugs into stero socket. I then action some code
> >> on
> >> the event and also check how long the button was held for.
> >>
> >> Any help appreciated
> >>
> >>
> >> SteveW
> >
> >