form keypress event does not work when a control has focus

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm trying to develop a mobile app in VS.NET 2003 in visual basic deployed to
a windows CE 2.0 device. The form keypress/keyup events work great until I
set focus to a listview, listbox, textbox, etc... then they stop firing.

Any suggestions to capture key events when a control has focus would be
greatly appreciated.
 
The KeyPreview property is not available to me when I bring up the form
properties. This is a mobile app and seems to be severly limited compared to
normal vb.net development in the GUI area.

The keypress/keyup/keydown events work UNTIL any control gets focus and then
not even that control's keypress events work.

Any other suggestions?

Thank you,

Tobin
 
You do realise CE 2.0 is not supported, right?

If you meant a PPC or a WinCE v4.1 and greater device, then Alex's reply for
CF v2.0 or Chris's for CF v1.0...

Cheers
Daniel
 
I think the IMessageFilter is the way I want to go.... but I haven't been
able to assemble a working version in VB.NET (thanks for the C# sample
though).

Searching through MSDN on IMessageFilter, they do not give a complete sample
for VB... tough to find one on the net as well.

Is it possible to implement the IMessageFilter interface in VB.NET?

Tobin

Sergey Bogdanov said:
The example how to use IMessageFilter for KeyDown trapping you may find
here:
http://www.sergeybogdanov.com/Samples/TextBoxKeyDownFilter.zip


--
Sergey Bogdanov [.NET CF MVP, MCSD]
http://www.sergeybogdanov.com

It is WinCE 4.1 or higher.... I will research Alex's reply. Thanks for the
advice.

Tobin

:
 
The IMessageFilter interface is a part of Smart Device Framework which
available here:
http://www.opennetcf.org/sdf/


--
Sergey Bogdanov [.NET CF MVP, MCSD]
http://www.sergeybogdanov.com

I think the IMessageFilter is the way I want to go.... but I haven't been
able to assemble a working version in VB.NET (thanks for the C# sample
though).

Searching through MSDN on IMessageFilter, they do not give a complete sample
for VB... tough to find one on the net as well.

Is it possible to implement the IMessageFilter interface in VB.NET?

Tobin

:

The example how to use IMessageFilter for KeyDown trapping you may find
here:
http://www.sergeybogdanov.com/Samples/TextBoxKeyDownFilter.zip


--
Sergey Bogdanov [.NET CF MVP, MCSD]
http://www.sergeybogdanov.com

It is WinCE 4.1 or higher.... I will research Alex's reply. Thanks for the
advice.

Tobin

:



You do realise CE 2.0 is not supported, right?

If you meant a PPC or a WinCE v4.1 and greater device, then Alex's reply for
CF v2.0 or Chris's for CF v1.0...

Cheers
Daniel
--
http://www.danielmoth.com/Blog/



I'm trying to develop a mobile app in VS.NET 2003 in visual basic deployed
to
a windows CE 2.0 device. The form keypress/keyup events work great until
I
set focus to a listview, listbox, textbox, etc... then they stop firing.

Any suggestions to capture key events when a control has focus would be
greatly appreciated.
 
Thanks so much, that's the final piece that made this whole thing make sense.
Mystery solved.

Sergey Bogdanov said:
The IMessageFilter interface is a part of Smart Device Framework which
available here:
http://www.opennetcf.org/sdf/


--
Sergey Bogdanov [.NET CF MVP, MCSD]
http://www.sergeybogdanov.com

I think the IMessageFilter is the way I want to go.... but I haven't been
able to assemble a working version in VB.NET (thanks for the C# sample
though).

Searching through MSDN on IMessageFilter, they do not give a complete sample
for VB... tough to find one on the net as well.

Is it possible to implement the IMessageFilter interface in VB.NET?

Tobin

:

The example how to use IMessageFilter for KeyDown trapping you may find
here:
http://www.sergeybogdanov.com/Samples/TextBoxKeyDownFilter.zip


--
Sergey Bogdanov [.NET CF MVP, MCSD]
http://www.sergeybogdanov.com


Tobin wrote:

It is WinCE 4.1 or higher.... I will research Alex's reply. Thanks for the
advice.

Tobin

:



You do realise CE 2.0 is not supported, right?

If you meant a PPC or a WinCE v4.1 and greater device, then Alex's reply for
CF v2.0 or Chris's for CF v1.0...

Cheers
Daniel
--
http://www.danielmoth.com/Blog/



I'm trying to develop a mobile app in VS.NET 2003 in visual basic deployed
to
a windows CE 2.0 device. The form keypress/keyup events work great until
I
set focus to a listview, listbox, textbox, etc... then they stop firing.

Any suggestions to capture key events when a control has focus would be
greatly appreciated.
 
Back
Top