Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to test which tab is selected in VB.net TabControl

I have a TabControl with two TabPages and I was wondering what is the best way to test which tab is currently displayed? I'm not sure why I can't figure this one out...

like image 246
Cody C Avatar asked Sep 24 '09 14:09

Cody C


2 Answers

TabControl.SelectedTab

like image 175
Austin Salonen Avatar answered Sep 28 '22 02:09

Austin Salonen


use that tab's "ENTER EVENT " eg.

   Private Sub TabName_Enter(ByVal sender As Object, ByVal e As System.EventArgs) Handles TabName.Enter
        MsgBox("me the tab selected")
         'or do whattever u like
    End Sub
like image 31
user1841730 Avatar answered Sep 28 '22 02:09

user1841730