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.

Re: form keypress event does not work when a control has focus by Alex

Alex
Fri Oct 07 05:37:19 CDT 2005

You should set the Form's PreviewKeys to true.

--
Alex Yakhnin, .NET CF MVP
www.intelliprog.com
www.opennetcf.org

"Tobin" <Tobin@discussions.microsoft.com> wrote in message
news:2527E207-D69E-4499-9C29-2A6DD978C8BC@microsoft.com...
> 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.



Re: form keypress event does not work when a control has focus by Tobin

Tobin
Sat Oct 08 13:25:39 CDT 2005

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

"Alex Yakhnin" wrote:

> You should set the Form's PreviewKeys to true.
>
> --
> Alex Yakhnin, .NET CF MVP
> www.intelliprog.com
> www.opennetcf.org
>
> "Tobin" <Tobin@discussions.microsoft.com> wrote in message
> news:2527E207-D69E-4499-9C29-2A6DD978C8BC@microsoft.com...
> > 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.
>
>
>

Re: form keypress event does not work when a control has focus by ctacke/>

ctacke/>
Sat Oct 08 19:26:45 CDT 2005

Use an IMessageFilter implementation. That catches everything.

-Chris


"Tobin" <Tobin@discussions.microsoft.com> wrote in message
news:93214E95-5FF7-4296-991E-B4D82DE8D44C@microsoft.com...
> 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
>
> "Alex Yakhnin" wrote:
>
>> You should set the Form's PreviewKeys to true.
>>
>> --
>> Alex Yakhnin, .NET CF MVP
>> www.intelliprog.com
>> www.opennetcf.org
>>
>> "Tobin" <Tobin@discussions.microsoft.com> wrote in message
>> news:2527E207-D69E-4499-9C29-2A6DD978C8BC@microsoft.com...
>> > 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.
>>
>>
>>



Re: form keypress event does not work when a control has focus by Daniel

Daniel
Sun Oct 09 13:31:25 CDT 2005

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/

"Tobin" <Tobin@discussions.microsoft.com> wrote in message
news:2527E207-D69E-4499-9C29-2A6DD978C8BC@microsoft.com...
> 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.




Re: form keypress event does not work when a control has focus by Tobin

Tobin
Mon Oct 10 07:02:04 CDT 2005

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

Tobin

"Daniel Moth" wrote:

> 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/
>
> "Tobin" <Tobin@discussions.microsoft.com> wrote in message
> news:2527E207-D69E-4499-9C29-2A6DD978C8BC@microsoft.com...
> > 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.
>
>
>
>

Re: form keypress event does not work when a control has focus by ctacke/>

ctacke/>
Mon Oct 10 08:30:29 CDT 2005

CF 2.0 is not supported on CE 4.1. You'll have to look at the
IMessageFilter.

-Chris

"Tobin" <Tobin@discussions.microsoft.com> wrote in message
news:B6A27098-1A54-47A4-8AE3-4110810CFB0F@microsoft.com...
> It is WinCE 4.1 or higher.... I will research Alex's reply. Thanks for
> the
> advice.
>
> Tobin
>
> "Daniel Moth" wrote:
>
>> 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/
>>
>> "Tobin" <Tobin@discussions.microsoft.com> wrote in message
>> news:2527E207-D69E-4499-9C29-2A6DD978C8BC@microsoft.com...
>> > 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.
>>
>>
>>
>>



Re: form keypress event does not work when a control has focus by Sergey

Sergey
Mon Oct 10 08:33:41 CDT 2005

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
>
> "Daniel Moth" wrote:
>
>
>>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/
>>
>>"Tobin" <Tobin@discussions.microsoft.com> wrote in message
>>news:2527E207-D69E-4499-9C29-2A6DD978C8BC@microsoft.com...
>>
>>>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.
>>
>>
>>
>>

Re: form keypress event does not work when a control has focus by Tobin

Tobin
Tue Oct 11 21:15:05 CDT 2005

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" wrote:

> 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
> >
> > "Daniel Moth" wrote:
> >
> >
> >>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/
> >>
> >>"Tobin" <Tobin@discussions.microsoft.com> wrote in message
> >>news:2527E207-D69E-4499-9C29-2A6DD978C8BC@microsoft.com...
> >>
> >>>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.
> >>
> >>
> >>
> >>
>

Re: form keypress event does not work when a control has focus by Sergey

Sergey
Wed Oct 12 03:21:58 CDT 2005

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


Tobin wrote:
> 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" wrote:
>
>
>>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
>>>
>>>"Daniel Moth" wrote:
>>>
>>>
>>>
>>>>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/
>>>>
>>>>"Tobin" <Tobin@discussions.microsoft.com> wrote in message
>>>>news:2527E207-D69E-4499-9C29-2A6DD978C8BC@microsoft.com...
>>>>
>>>>
>>>>>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.
>>>>
>>>>
>>>>
>>>>

Re: form keypress event does not work when a control has focus by Tobin

Tobin
Wed Oct 12 19:39:04 CDT 2005

Thanks so much, that's the final piece that made this whole thing make sense.
Mystery solved.

"Sergey Bogdanov" wrote:

> 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
>
>
> Tobin wrote:
> > 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" wrote:
> >
> >
> >>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
> >>>
> >>>"Daniel Moth" wrote:
> >>>
> >>>
> >>>
> >>>>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/
> >>>>
> >>>>"Tobin" <Tobin@discussions.microsoft.com> wrote in message
> >>>>news:2527E207-D69E-4499-9C29-2A6DD978C8BC@microsoft.com...
> >>>>
> >>>>
> >>>>>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.
> >>>>
> >>>>
> >>>>
> >>>>
>