Problem capturing the Tab key in the KeyDown event 
Author Message
 Problem capturing the Tab key in the KeyDown event

What's so special about the <Tab> key that I can't seem to trap it to
assign some special functionality to it in my VB6 program?

I have a form with a Farpoint tab control on it. On that tab control
is another Farpoint tab control. On the second tab control is a
Farpoint list control. In the list control's KeyDown event, I have
some code that executes when various keys are pressed (Tab, PageUp,
PageDown, RightArrow, LeftArrow, various function keys).

Code is executing just fine for Ctrl-Tab and Alt-Tab - in fact, they
all work except for just-plain-Tab-Key. Pressing the Tab key doesn't
even fire the KeyDown event (I put a Stop statement in there to test
it). Pressing <TAB> just moves the focus around to different objects
on the screen.

The form on which these controls reside has its KeyPreview property
set to True.

What am I missing? Why does the Tab key get treated differently?



Sat, 11 Dec 2010 22:27:21 GMT  
 Problem capturing the Tab key in the KeyDown event

Quote:
> What's so special about the <Tab> key that I can't seem to trap it to
> assign some special functionality to it in my VB6 program?

> I have a form with a Farpoint tab control on it. On that tab control
> is another Farpoint tab control. On the second tab control is a
> Farpoint list control. In the list control's KeyDown event, I have
> some code that executes when various keys are pressed (Tab, PageUp,
> PageDown, RightArrow, LeftArrow, various function keys).

> Code is executing just fine for Ctrl-Tab and Alt-Tab - in fact, they
> all work except for just-plain-Tab-Key. Pressing the Tab key doesn't
> even fire the KeyDown event (I put a Stop statement in there to test
> it). Pressing <TAB> just moves the focus around to different objects
> on the screen.

> The form on which these controls reside has its KeyPreview property
> set to True.

> What am I missing? Why does the Tab key get treated differently?

Perhaps this will help...

http://www.vbforums.com/showthread.php?t=231180

Rick



Sat, 11 Dec 2010 22:44:53 GMT  
 Problem capturing the Tab key in the KeyDown event
On Tue, 24 Jun 2008 10:44:53 -0400, "Rick Rothstein \(MVP - VB\)"

Quote:

>> What's so special about the <Tab> key that I can't seem to trap it to
>> assign some special functionality to it in my VB6 program?

>> I have a form with a Farpoint tab control on it. On that tab control
>> is another Farpoint tab control. On the second tab control is a
>> Farpoint list control. In the list control's KeyDown event, I have
>> some code that executes when various keys are pressed (Tab, PageUp,
>> PageDown, RightArrow, LeftArrow, various function keys).

>> Code is executing just fine for Ctrl-Tab and Alt-Tab - in fact, they
>> all work except for just-plain-Tab-Key. Pressing the Tab key doesn't
>> even fire the KeyDown event (I put a Stop statement in there to test
>> it). Pressing <TAB> just moves the focus around to different objects
>> on the screen.

>> The form on which these controls reside has its KeyPreview property
>> set to True.

>> What am I missing? Why does the Tab key get treated differently?

>Perhaps this will help...

>http://www.vbforums.com/showthread.php?t=231180

>Rick

Thanks Rick.

That was it. I had checked for that but had missed a control. When I
set that last one to false, the Tab key started showing up in the
KeyDown event.



Sat, 11 Dec 2010 23:30:15 GMT  
 Problem capturing the Tab key in the KeyDown event
Did you try Control-Tab ???
Works many place where Tab alone does not.


Quote:
> What's so special about the <Tab> key that I can't seem to trap it to
> assign some special functionality to it in my VB6 program?

> I have a form with a Farpoint tab control on it. On that tab control
> is another Farpoint tab control. On the second tab control is a
> Farpoint list control. In the list control's KeyDown event, I have
> some code that executes when various keys are pressed (Tab, PageUp,
> PageDown, RightArrow, LeftArrow, various function keys).

> Code is executing just fine for Ctrl-Tab and Alt-Tab - in fact, they
> all work except for just-plain-Tab-Key. Pressing the Tab key doesn't
> even fire the KeyDown event (I put a Stop statement in there to test
> it). Pressing <TAB> just moves the focus around to different objects
> on the screen.

> The form on which these controls reside has its KeyPreview property
> set to True.

> What am I missing? Why does the Tab key get treated differently?



Sun, 12 Dec 2010 10:01:46 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Can I trap the tab key in an event like keypress or keydown

2. Capturing Tab key and Shift-Tab key

3. Having problems capturing keydown events

4. Enter Key and arrow keys Tab viia KEYDOWN

5. how do we capture the Tab Key Press event in a text box

6. Capturing a keydown event

7. Capturing Screen keydown events ?

8. Access 95: Constant for Page Down Key in Keydown Event

9. multiple keys in a keydown event

10. KeyDown event - Why can't I block _all_ keys

11. Peculiar behavior of the F10 key in the Keydown event

12. Capturing TAB key inside of TextBox (vb4)

 

 
Powered by phpBB® Forum Software