Wrox Programmer Forums
Pro VB.NET 2002/2003 For advanced Visual Basic coders working .NET version 2002/2003. Beginning-level questions will be redirected to other forums, including Beginning VB.NET.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB.NET 2002/2003 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old September 19th, 2003, 12:32 AM
Authorized User
Join Date: Jul 2003
Posts: 40
Thanks: 0
Thanked 1 Time in 1 Post
Default Tab page

How to I activate at TabPage that I choose by coding.
I mean want to show form that contains some tabpages on the exacly tabpage ?? It always show the tappage whose index is the first index.

Old October 21st, 2003, 04:01 AM
Registered User
Join Date: Oct 2003
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts

There are a few ways to do this, I'll show you two:

You simply set the SelectedIndex property of the TabControl object you are working with the index number of the TabPage you want to display.

TabControl1.SelectedIndex = 0 ' First Tab
TabControl1.SelectedIndex = 1 ' Second Tab
TabControl1.SelectedIndex = 2 ' Third Tab

OR you can set the SelectedTab property to the TabPage you want to jump to.

TabControl1.SelectedTab = TabPage1 ' First
TabControl1.SelectedTab = TabPage2 ' Second
TabControl1.SelectedTab = TabPage3 ' Third

NOTE in the second example, 'TabPage1' is the name of the page objects itself. You might call your objects something else.

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cross-tab running off the page sanjumodgil ASP.NET 1.0 and 1.1 Basics 0 January 19th, 2007 12:41 PM
Help with tab page Edward King HTML Code Clinic 1 August 12th, 2005 05:01 AM
Hiding tab page headings badgolfer VS.NET 2002/2003 1 June 15th, 2005 04:29 PM
Print Dialogue for Forms per tab/page jaip2p Access VBA 1 November 20th, 2003 12:33 PM
Tab page problem melvik C# 0 September 23rd, 2003 09:10 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.