PC Review


Reply
Thread Tools Rate Thread

Capture Enter key from keyboard

 
 
=?Utf-8?B?U3RldmVJbkJlbG9pdA==?=
Guest
Posts: n/a
 
      25th May 2005
One more quick question. When I tab to the Enter button I have added, I want
to push the enter button on the device keyboard. I need the on-click of my
enter button to fire when that happens.

How can I do this?

Thanks,
Steve
 
Reply With Quote
 
 
 
 
Paul G. Tobey [eMVP]
Guest
Posts: n/a
 
      25th May 2005
Well, there are numerous possibilities. If the button has the focus, you'll
probably have to catch the WM_KEYDOWN message and act (your code to catch it
will have to know whether the Enter button is focused or not). I'd do this
by using ApplicationEx from OpenNETCF as my application class, and an
IMessageFilter subclass (also OpenNETCF), to look for WM_KEYDOWN events. If
the IMessageFilter subclass has a reference to your form, it can check
whether the Enter button has the focus and, if it does, and if the key down
is Enter, it can send the on-click event.

Paul T.

"SteveInBeloit" <(E-Mail Removed)> wrote in message
news:97278664-3E2D-4510-AC0C-(E-Mail Removed)...
> One more quick question. When I tab to the Enter button I have added, I
> want
> to push the enter button on the device keyboard. I need the on-click of
> my
> enter button to fire when that happens.
>
> How can I do this?
>
> Thanks,
> Steve



 
Reply With Quote
 
=?Utf-8?B?ZHJ1bXJlZA==?=
Guest
Posts: n/a
 
      16th Jun 2005
Paul,

I have a similar question. I am entering text into a TextBox using the SIP
on a PocketPC. I can reflect data back to a Label control, so the SIP
control is working. I would like to hit the <Enter> key and have the SIP
become disabled. However, the SIP does not have an event for the <Enter>
key. I am getting ready to try using WM_KEYDOWN in VB as you've suggested
but have a nagging feeling this is a tough way to accomplish the task at hand.

Kent L.
"Paul G. Tobey [eMVP]" wrote:

> Well, there are numerous possibilities. If the button has the focus, you'll
> probably have to catch the WM_KEYDOWN message and act (your code to catch it
> will have to know whether the Enter button is focused or not). I'd do this
> by using ApplicationEx from OpenNETCF as my application class, and an
> IMessageFilter subclass (also OpenNETCF), to look for WM_KEYDOWN events. If
> the IMessageFilter subclass has a reference to your form, it can check
> whether the Enter button has the focus and, if it does, and if the key down
> is Enter, it can send the on-click event.
>
> Paul T.
>
> "SteveInBeloit" <(E-Mail Removed)> wrote in message
> news:97278664-3E2D-4510-AC0C-(E-Mail Removed)...
> > One more quick question. When I tab to the Enter button I have added, I
> > want
> > to push the enter button on the device keyboard. I need the on-click of
> > my
> > enter button to fire when that happens.
> >
> > How can I do this?
> >
> > Thanks,
> > Steve

>
>
>

 
Reply With Quote
 
Paul G. Tobey [eMVP]
Guest
Posts: n/a
 
      16th Jun 2005
Are we talking about a real SIP? Can't you use a method of the InputPanel
(or something like that; all of our devices have keyboards, so I'm not an
expert on what you do to control a SIP), to turn the SIP off?

Paul T.

"drumred" <(E-Mail Removed)> wrote in message
news:F8FFE180-C5CB-46BB-8599-(E-Mail Removed)...
> Paul,
>
> I have a similar question. I am entering text into a TextBox using the
> SIP
> on a PocketPC. I can reflect data back to a Label control, so the SIP
> control is working. I would like to hit the <Enter> key and have the SIP
> become disabled. However, the SIP does not have an event for the <Enter>
> key. I am getting ready to try using WM_KEYDOWN in VB as you've suggested
> but have a nagging feeling this is a tough way to accomplish the task at
> hand.
>
> Kent L.
> "Paul G. Tobey [eMVP]" wrote:
>
>> Well, there are numerous possibilities. If the button has the focus,
>> you'll
>> probably have to catch the WM_KEYDOWN message and act (your code to catch
>> it
>> will have to know whether the Enter button is focused or not). I'd do
>> this
>> by using ApplicationEx from OpenNETCF as my application class, and an
>> IMessageFilter subclass (also OpenNETCF), to look for WM_KEYDOWN events.
>> If
>> the IMessageFilter subclass has a reference to your form, it can check
>> whether the Enter button has the focus and, if it does, and if the key
>> down
>> is Enter, it can send the on-click event.
>>
>> Paul T.
>>
>> "SteveInBeloit" <(E-Mail Removed)> wrote in
>> message
>> news:97278664-3E2D-4510-AC0C-(E-Mail Removed)...
>> > One more quick question. When I tab to the Enter button I have added,
>> > I
>> > want
>> > to push the enter button on the device keyboard. I need the on-click
>> > of
>> > my
>> > enter button to fire when that happens.
>> >
>> > How can I do this?
>> >
>> > Thanks,
>> > Steve

>>
>>
>>



 
Reply With Quote
 
=?Utf-8?B?ZHJ1bXJlZA==?=
Guest
Posts: n/a
 
      17th Jun 2005
Paul,

Yes, this is a real SIP. There don't seem to be any methods available with
the SIP, or else I'm missing how to locate them. I'm quessing that since
it's the compact framework that I'll have to do more work. I used the
Key_Down method to determine that the enter key was pressed to accomplish the
same task. But, like you, I would have thought a "enter" pressed method
would be available.

Regards, drumred

"Paul G. Tobey [eMVP]" wrote:

> Are we talking about a real SIP? Can't you use a method of the InputPanel
> (or something like that; all of our devices have keyboards, so I'm not an
> expert on what you do to control a SIP), to turn the SIP off?
>
> Paul T.
>
> "drumred" <(E-Mail Removed)> wrote in message
> news:F8FFE180-C5CB-46BB-8599-(E-Mail Removed)...
> > Paul,
> >
> > I have a similar question. I am entering text into a TextBox using the
> > SIP
> > on a PocketPC. I can reflect data back to a Label control, so the SIP
> > control is working. I would like to hit the <Enter> key and have the SIP
> > become disabled. However, the SIP does not have an event for the <Enter>
> > key. I am getting ready to try using WM_KEYDOWN in VB as you've suggested
> > but have a nagging feeling this is a tough way to accomplish the task at
> > hand.
> >
> > Kent L.
> > "Paul G. Tobey [eMVP]" wrote:
> >
> >> Well, there are numerous possibilities. If the button has the focus,
> >> you'll
> >> probably have to catch the WM_KEYDOWN message and act (your code to catch
> >> it
> >> will have to know whether the Enter button is focused or not). I'd do
> >> this
> >> by using ApplicationEx from OpenNETCF as my application class, and an
> >> IMessageFilter subclass (also OpenNETCF), to look for WM_KEYDOWN events.
> >> If
> >> the IMessageFilter subclass has a reference to your form, it can check
> >> whether the Enter button has the focus and, if it does, and if the key
> >> down
> >> is Enter, it can send the on-click event.
> >>
> >> Paul T.
> >>
> >> "SteveInBeloit" <(E-Mail Removed)> wrote in
> >> message
> >> news:97278664-3E2D-4510-AC0C-(E-Mail Removed)...
> >> > One more quick question. When I tab to the Enter button I have added,
> >> > I
> >> > want
> >> > to push the enter button on the device keyboard. I need the on-click
> >> > of
> >> > my
> >> > enter button to fire when that happens.
> >> >
> >> > How can I do this?
> >> >
> >> > Thanks,
> >> > Steve
> >>
> >>
> >>

>
>
>

 
Reply With Quote
 
Paul G. Tobey [eMVP]
Guest
Posts: n/a
 
      17th Jun 2005
You have an InputPanel object on your form? That's what would be your
interface to the SIP...

Paul T.

"drumred" <(E-Mail Removed)> wrote in message
news:E3352A88-7338-4B0F-9A6B-(E-Mail Removed)...
> Paul,
>
> Yes, this is a real SIP. There don't seem to be any methods available
> with
> the SIP, or else I'm missing how to locate them. I'm quessing that since
> it's the compact framework that I'll have to do more work. I used the
> Key_Down method to determine that the enter key was pressed to accomplish
> the
> same task. But, like you, I would have thought a "enter" pressed method
> would be available.
>
> Regards, drumred
>
> "Paul G. Tobey [eMVP]" wrote:
>
>> Are we talking about a real SIP? Can't you use a method of the
>> InputPanel
>> (or something like that; all of our devices have keyboards, so I'm not an
>> expert on what you do to control a SIP), to turn the SIP off?
>>
>> Paul T.
>>
>> "drumred" <(E-Mail Removed)> wrote in message
>> news:F8FFE180-C5CB-46BB-8599-(E-Mail Removed)...
>> > Paul,
>> >
>> > I have a similar question. I am entering text into a TextBox using the
>> > SIP
>> > on a PocketPC. I can reflect data back to a Label control, so the SIP
>> > control is working. I would like to hit the <Enter> key and have the
>> > SIP
>> > become disabled. However, the SIP does not have an event for the
>> > <Enter>
>> > key. I am getting ready to try using WM_KEYDOWN in VB as you've
>> > suggested
>> > but have a nagging feeling this is a tough way to accomplish the task
>> > at
>> > hand.
>> >
>> > Kent L.
>> > "Paul G. Tobey [eMVP]" wrote:
>> >
>> >> Well, there are numerous possibilities. If the button has the focus,
>> >> you'll
>> >> probably have to catch the WM_KEYDOWN message and act (your code to
>> >> catch
>> >> it
>> >> will have to know whether the Enter button is focused or not). I'd do
>> >> this
>> >> by using ApplicationEx from OpenNETCF as my application class, and an
>> >> IMessageFilter subclass (also OpenNETCF), to look for WM_KEYDOWN
>> >> events.
>> >> If
>> >> the IMessageFilter subclass has a reference to your form, it can check
>> >> whether the Enter button has the focus and, if it does, and if the key
>> >> down
>> >> is Enter, it can send the on-click event.
>> >>
>> >> Paul T.
>> >>
>> >> "SteveInBeloit" <(E-Mail Removed)> wrote in
>> >> message
>> >> news:97278664-3E2D-4510-AC0C-(E-Mail Removed)...
>> >> > One more quick question. When I tab to the Enter button I have
>> >> > added,
>> >> > I
>> >> > want
>> >> > to push the enter button on the device keyboard. I need the
>> >> > on-click
>> >> > of
>> >> > my
>> >> > enter button to fire when that happens.
>> >> >
>> >> > How can I do this?
>> >> >
>> >> > Thanks,
>> >> > Steve
>> >>
>> >>
>> >>

>>
>>
>>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Capture Enter in textbox =?Utf-8?B?RkNsaWZ0b24=?= Microsoft Excel Programming 1 14th Mar 2007 08:05 PM
Capture ENTER =?Utf-8?B?RWQ=?= Microsoft Excel Programming 3 7th Oct 2005 10:07 PM
Capture Enter Key in ASP.NET ewillyb@gmail.com Microsoft ASP .NET 5 28th Jul 2005 06:04 PM
Capture Enter Key in DataGrid =?Utf-8?B?SVNU?= Microsoft ASP .NET 2 8th Apr 2005 11:15 PM
Capture ENTER key in vb.net datagrid Melson Microsoft VB .NET 3 26th Jan 2005 02:38 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:55 PM.