Open Form on numeric key press

J

joe.radjavitch

Hi,

I am writing an app that opens a particular form when a number is
pressed.

I catch the keydown event and open the form when a number is pressed
and the form is not visible, but the number key press is not sent to
the form I just opened.

Do I have to send the numeric keypress to the newly opened for? How do
I do this?

FYI. After the form is opened, subsequent key presses are handled
properly.

Thanks,
JR
 
C

Chris Tacke, eMVP

So you want the number to both bring the form Visible and forward *and* get
passed to that Form as a key stroke? Yes, you'll certainly have to pass it
in, as the Form wasn't around to receive the keypress in the first place.


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com
 
J

joe.radjavitch

So you want the number to both bring the form Visible and forward *and* get
passed to that Form as a key stroke?  Yes, you'll certainly have to pass it
in, as the Form wasn't around to receive the keypress in the first place.

--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded communityhttp://community.OpenNETCF.com

Yes...I want to open the form "and" pass it to the form.

Similar when the phone is on the today screen and a number is pressed.
The phone app opens with that number as the first digit.

Thanks,
JR
 
C

Chris Tacke, eMVP

Ah, so that context helps me understand what you're trying to achieve a
*lot* better. It really depends on how that key is being intercepted in the
first place, but I'd probably be inclined to have some form of "listener" or
"key interceptor" running that gets *all* keys, not just the first, and it
does the work of loading/showing the target form and it would simply pass
the key data to it via an event or method.


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com


So you want the number to both bring the form Visible and forward *and*
get
passed to that Form as a key stroke? Yes, you'll certainly have to pass it
in, as the Form wasn't around to receive the keypress in the first place.

--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded communityhttp://community.OpenNETCF.com

Yes...I want to open the form "and" pass it to the form.

Similar when the phone is on the today screen and a number is pressed.
The phone app opens with that number as the first digit.

Thanks,
JR
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top