Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / September 2004

Tip: Looking for answers? Try searching our database.

Get current page index in tab control

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
moondaddy - 24 Sep 2004 05:29 GMT
I'm writing a winforms app in vb.net 1.1 and have a tab control on one of
the forms.  each time a different page is selected in the tab control I need
to run code in the form for that particular page.  how can I determine which
tab or page was selected.  I tried using the TabIndexChanged event, but it
doesn't fire when I click on a different tab.

any ideas?

Thanks

Signature

moondaddy@nospam.com

"Gary Chang" - 24 Sep 2004 09:21 GMT
Hi,

> how can I determine which tab or page was selected.  I tried using the
TabIndexChanged event, but it doesn't fire when I click on a different tab.

To determine which tab or page was selected, you can handle the
TabControl.SelectedIndexChanged event and query its SelectedIndex property:
this.tabControl1.SelectedIndex

Regarding as the TabIndexChanged event, it would be raised if the TabIndex
property(Tab order of the controls within a Winform) is changed by either a
programmatic modification or user interaction:
Changing the Tab Order of Controls
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcresed/htm
l/_asug_changing_the_tab_order.asp

Thanks!

Best regards,

Gary Chang
Microsoft Online Partner Support

Signature

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
moondaddy - 24 Sep 2004 14:51 GMT
Thanks that's exactly what I was looking for.  for some reason, my eyes
didn't see that property in the property list.

Signature

moondaddy@nospam.com

> Hi,
>
[quoted text clipped - 9 lines]
> programmatic modification or user interaction:
> Changing the Tab Order of Controls

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcresed/htm
> l/_asug_changing_the_tab_order.asp
>
[quoted text clipped - 8 lines]
> This posting is provided "AS IS" with no warranties, and confers no rights.
> --------------------
"Gary Chang" - 27 Sep 2004 03:43 GMT
Well, I am glad that I can help you find the property you wanted.

Good Luck!

Best regards,

Gary Chang
Microsoft Online Partner Support

Signature

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
> From: "moondaddy" <moondaddy@nospam.com>
> References: <Ok8B72eoEHA.1272@TK2MSFTNGP09.phx.gbl>
<O$OM59goEHA.740@cpmsftngxa06.phx.gbl>
> Subject: Re: Get current page index in tab control
> Date: Fri, 24 Sep 2004 08:51:38 -0500
[quoted text clipped - 6 lines]
> Newsgroups: microsoft.public.dotnet.framework.windowsforms
> NNTP-Posting-Host: adsl-70-240-199-243.dsl.hstntx.swbell.net
70.240.199.243
> Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP15.phx.gbl
> Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.windowsforms:74061
> X-Tomcat-NG: microsoft.public.dotnet.framework.windowsforms
>
[quoted text clipped - 17 lines]
> > programmatic modification or user interaction:
> > Changing the Tab Order of Controls

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcresed/htm
> > l/_asug_changing_the_tab_order.asp
> >
[quoted text clipped - 9 lines]
> rights.
> > --------------------

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.