Results 1 to 6 of 6

Thread: can v trap tab key in a textbox

  1. #1

    Thread Starter
    Lively Member satti charvak's Avatar
    Join Date
    Apr 2001
    Location
    noida, india
    Posts
    90

    Lightbulb can v trap tab key in a textbox

    is there any way one can trap a tab key in a text box.....please hlp with any code

  2. #2
    PowerPoster
    Join Date
    Aug 2001
    Location
    new jersey
    Posts
    2,904
    the tab key is chr(9) or vbTab

  3. #3
    Frenzied Member dis1411's Avatar
    Join Date
    Mar 2001
    Posts
    1,048
    all other controls must have thier tabstop property set to false, then

    VB Code:
    1. [color="#0000A0"]Private[/color] [color="#0000A0"]Sub[/color] Text1_KeyPress(KeyAscii [color="#0000A0"]As[/color] [color="#0000A0"]Integer[/color])
    2.     [color="#0000A0"]If[/color] KeyAscii = 9 [color="#0000A0"]Then[/color] Print "tab"
    3. [color="#0000A0"]End[/color] [color="#0000A0"]Sub[/color]

  4. #4

    Thread Starter
    Lively Member satti charvak's Avatar
    Join Date
    Apr 2001
    Location
    noida, india
    Posts
    90

    Unhappy

    Is it not possible to trap tab key even when other controls have tabtop property set to true.....i've chekced it is not possile but is there any workAround.

  5. #5
    Frenzied Member dis1411's Avatar
    Join Date
    Mar 2001
    Posts
    1,048
    Originally posted by satti charvak
    Is it not possible to trap tab key even when other controls have tabtop property set to true.....i've chekced it is not possile but is there any workAround.
    set it to FALSE

  6. #6

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width