From: Randy Day on
Henning wrote:

[snip]

>>As with the Tab key in other controls, even a Form with KeyPreview = True
>
> does
>
>>not receive the key up events for the tab or arrow keys when the grid has
>
> focus.
>
>>
> hmmm, your'e right ofcause :(
> Same for home, end, pageup, pagedn. But with a ListBox having focus it's ok
> !?
> /Henning


Another option in that case is to disable the grid,
then use the form keypreview to decide whether the
next key pressed gets sent to the grid as a movement
command or an entry to a cell. Enable the grid,
process the key, then disable again, if necessary.

I don't have VB handy, so I can't be sure this would
work in any useful way.

HTH
From: Henning on

"Henning" <computer_hero(a)coldmail.com> skrev i meddelandet
news:44495f49$0$6624$57c3e1d3(a)news3.bahnhof.se...
>
> "Steve Gerrard" <mynamehere(a)comcast.net> skrev i meddelandet
> news:2cidnSg06ppNbNXZnZ2dnUVZ_tKdnZ2d(a)comcast.com...
> >
> > "Henning" <computer_hero(a)coldmail.com> wrote in message
> > news:4448e180$0$6625$57c3e1d3(a)news3.bahnhof.se...
> > > From VB6 MSDN Help
> > >
> > > Note If the KeyPreview property is set to True, a form receives
these
> > > events before controls on the form receive the events. Use the
> KeyPreview
> > > property to create global keyboard-handling routines.
> > >
> > > Change MSHFlexGrid1_KeyUp / KeyDn to Form_KeyUp / KeyDn to catch the
> events.
> > >
> >
> > As with the Tab key in other controls, even a Form with KeyPreview =
True
> does
> > not receive the key up events for the tab or arrow keys when the grid
has
> focus.
> >
> >
> hmmm, your'e right ofcause :(
> Same for home, end, pageup, pagedn. But with a ListBox having focus it's
ok
> !?
> /Henning
>
Beeing curious i had to test this.
It seems that Alt-ArrowKey is producing the wanted event. It's not moving
the cells in the grid, but reports vbKeyUp/Down/Right/Left as Down or Up.
/Henning