Results 1 to 5 of 5

Thread: Disable left, right, up and down key

  1. #1

    Thread Starter
    Hyperactive Member RS_Arm's Avatar
    Join Date
    Mar 2007
    Location
    Planet Earth
    Posts
    282

    Exclamation Disable left, right, up and down key

    Hi guys. Here's my problem: i've done a wizard style form using sstab. For each step completed, i will change the active tab (triggered by next, previous buttons).
    I've disabled the tab funtionality setting the SSTab property "TabStop = False". This works only for tab key,but not with up, down, right and down keys, so, i need to disable this keys, right?
    Please, help me.

    Thanks

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Disable left, right, up and down key

    Welcome to the forums.

    Why do you feel that need to disable those keys?

    When you run your app, and use these keys, what happens that might be undesirable?

  3. #3

    Thread Starter
    Hyperactive Member RS_Arm's Avatar
    Join Date
    Mar 2007
    Location
    Planet Earth
    Posts
    282

    Re: Disable left, right, up and down key

    Well, if the user sees the others tabs, they may access some data that hasn't been yet filled, and then it may crash my app. Thanks anyway, but i've resolved my problem with this piece of code:

    Private Sub MultiPage1_GotFocus()
    MainProg.CancelButton.SetFocus ' when the tab gets focus,
    'the cancel object will get the focus
    End Sub

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Disable left, right, up and down key

    Quote Originally Posted by RS_Arm
    Well, if the user sees the others tabs, they may access some data that hasn't been yet filled, and then it may crash my app.
    This possibility is something your code should be set up to handle in such a way as to not have your app crash, and to provide a message to the user indicating what is happening.

  5. #5
    PowerPoster gavio's Avatar
    Join Date
    Feb 2006
    Location
    GMT+1
    Posts
    4,462

    Re: Disable left, right, up and down key

    You can use the validation in each control that needs to be filled in. That will not allow for that control to loose focus until it's validated.

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