Programmatically selecting the tab page to get focus

Posted on 2007-08-08
Last Modified: 2013-12-26
I need to move the focus to specific controls on specific tab pages within tabcontrol (standard CF tab control). For example I need to move to a datetimepicker (dtSchedule) on tabpage 2 from tabpage 4.

I seem to remember it had something to do with the tab index but don't remember the syntax. Thanks,

Question by:JackW9653
    LVL 38

    Expert Comment

    Is this .NET or VB6... What is the CF tab control?  


    Author Comment

    VB.Net (Visual Studio 2005) - CF = Compact Framework. This is a Mobile 5.0 app.
    LVL 38

    Accepted Solution

    Should be like:

    TabControl.SelectedIndex = Index  'Zero based

    Author Comment

    Thanks Paul,worked well.

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Join & Write a Comment

    As the title indicates, I have done this before. It chills me everytime I update the OS on my phone, ( because one time I did this and I essentially had a bricked …
    Once again I push the limits of my phone.  An introduction to the Android Google Now Launcher.
    As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
    Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

    733 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now