Results 1 to 3 of 3

Thread: Form1.Setfocus for keypress

  1. #1

    Thread Starter
    Join Date
    Aug 1999
    Looks like Text1.SetFocus works better for trapping the downarrow key to scroll up and down a bitmap, than does Form1.SetFocus. Using the downarrow key after Form1.SetFocus when coming out of a control goes directly into tab order and the cursor jumps thru all of the controls.

    Text1.SetFocus requires that Text1.Visible=True, which is kind of ugly if I don't need a textbox.

    What control (and keypress) is recommended for best detecting, say, the user hitting the downarrow key?


  2. #2
    Addicted Member Mage33's Avatar
    Join Date
    Aug 2000
    Petaluma, California

    Smile Hmm..

    Dunno, but why not just put the textbox off the screen?
    Stephen Haney- 115 116 101 118 101 31 72 65 78 69 89 ^ My name in ASCII ^
    You forget something new every day
    | WinME | VB6 Pro | MSC++ | Lambda MOO |

  3. #3
    Set the KeyPreview property of the Form to True. This will make sure that all key presses go to the Form first, then the control which has the focus.

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