Enter-key to have tab-key functionality

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Nano

    #1

    Enter-key to have tab-key functionality

    Hi,

    I have an application written in vb (2003 dotnet 1.1) which requires a lot
    of user input, mostly numeric. Now I would like to jump from textbox-to-
    textbox when pressing the enter-key, just like using the tab-key.

    I found I have problems with just using .SelectNextCont rol, when for
    example the next control is (temporarily) invisible.

    Should I just override:
    ProcessCmdKey(B yRef msg As Windows.Forms.M essage, ByVal keyData As
    Windows.Forms.K eys)

    Or is there a regular best-practise for this issue?

    Thanks for any suggestions/solutions in advance!

    Nano
  • Melissa Nava

    #2
    Re: Enter-key to have tab-key functionality

    You may try this guys suggestion:


    Just an idea.

    Comment

    • Nano

      #3
      Re: Enter-key to have tab-key functionality

      "Melissa Nava" <melissa.nava@g mail.com> wrote in
      news:1147128048 .316884.271670@ i39g2000cwa.goo glegroups.com:
      [color=blue]
      > http://blogs.duncanmackenzie.net/dun...12/13/936.aspx[/color]

      Thanks very much, that looks just perfect! I'll try that asap!

      Nano

      Comment

      • Dennis

        #4
        RE: Enter-key to have tab-key functionality

        Not sure I understand. If the control is "temporairl y invisible" then you
        can't set the focus to the control. Am I missing something?
        --
        Dennis in Houston


        "Nano" wrote:
        [color=blue]
        > Hi,
        >
        > I have an application written in vb (2003 dotnet 1.1) which requires a lot
        > of user input, mostly numeric. Now I would like to jump from textbox-to-
        > textbox when pressing the enter-key, just like using the tab-key.
        >
        > I found I have problems with just using .SelectNextCont rol, when for
        > example the next control is (temporarily) invisible.
        >
        > Should I just override:
        > ProcessCmdKey(B yRef msg As Windows.Forms.M essage, ByVal keyData As
        > Windows.Forms.K eys)
        >
        > Or is there a regular best-practise for this issue?
        >
        > Thanks for any suggestions/solutions in advance!
        >
        > Nano
        >[/color]

        Comment

        • Nano

          #5
          RE: Enter-key to have tab-key functionality

          =?Utf-8?B?RGVubmlz?= <Dennis@discuss ions.microsoft. com> wrote in
          news:987A99CE-2B7E-4A8F-811D-034F20ADAACD@mi crosoft.com:
          [color=blue]
          > Not sure I understand. If the control is "temporairl y invisible" then
          > you can't set the focus to the control. Am I missing something?[/color]

          You are right, that's why I got an error when using SelectNextContr ol.
          Although the control is invisible, it may be still the next control (which
          can not be focused/selected when invisible).

          Nano

          Comment

          Working...