Capturing Cntrl-Tab in place of Tab for tab indexing

Capturing Cntrl-Tab in place of Tab for tab indexing

Post by sheryl.ok.. » Fri, 07 Jan 1994 18:45:51



Using Visual Basic I have a form that has five text fields.  The first
four fields use the <Enter> key to set the focus to the next field.  The
last text field is the body of the form.  It needs access to both the
<Enter> key for paragraph line feeds, and the <Tab> key for tab input.

So I've tried to allow this field to use the <CNTRL> <TAB> keys in
combination so that they go back to the previous fields because the
<Enter> and <Tab> keys have been disabled for field tabstops.

I've tried doing the following in the KeyDown Event for that field,
but it doesn't work for the tab.  It only works for the NON-ASCII
keys like <F1>-<F12>.  Does anyone know what I can do to get this to
work?

Sub Text1_KeyDown (KeyCode As Integer, Shift As Integer)
        Dim CtrlDown
        Const KEY_TAB = &H11
        Const CTRL_MASK = 2
        CtrlDown = (Shift And SHIFT_MASK) > 0
        If KeyCode = KEY_TAB Then
                If CntrlDown Then
                        Text1.SetFocus
                End If
        End If
End Sub

Any help would be very much appreciated.

Thanks, Sheryl

 
 
 

1. Tabbing in the tab common control

I am having a heck of a time tabbing among the controls of the child
dialogs on the various tabs of the tab control.  Seems like this
should be easier to accomplish.  I have tried setting "control parent"
in the top level dialog and the child dialogs.  I can't seem to get
the right combination of flags, etc.

Please show me the light!

Jim

2. Adler SE1035 query

3. Article: Implementing drag 'n drop tab sorting in a tab control

4. WordPerfect to ASCII translator for Sun/Unix

5. Tab order with a tab control

6. Chunky Pixel Mode for Low End Chip Set?

7. Disabling tabs in a tab control

8. tabbing in subdialog of tab control of CDialog blows up

9. Ctrl-tab and tab control in a dialog

10. Tab controls and Ctrl-Tab

11. Generic Tab control and Tab pages

12. How could i get the property sheet tab control with single row tabs?