Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Windows Application event help.

  1. Jan 9, 2008 #1
    Hello, I am trying to learn Windows API on my own and I'm having a little trouble. I made an "Enter" button and all I want to do is basically when the user is finished with one textbox, when they press the "Enter" button that I created, i want the cursor to go to the next textbox. I've been looking for something like a tab event, but I can't seem to find such an event, or I don't know what code to put in the function. All I have is this:
    private: System::Void btnEnter_Click(System::Object * sender, System::EventArgs * e)
    {

    }
    Can anyone help me please? Again all I want it to do is go from textbox1 to textbox2 to textbox3. Thanx In Advance!!!
     
  2. jcsd
  3. Jan 10, 2008 #2
    PLEASE! Anybody?
     
  4. Jan 11, 2008 #3
    Well you didn't provide much frame of reference, but I'm going to assume that this is Visual C++ because of the events. I would recommend use of the Focus() method. Also note, to be focusable, Focusable and IsEnabled must both be true.

    MSDN link: http://msdn2.microsoft.com/en-us/library/system.windows.uielement.focus.aspx
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?