Hi guys ive got a problem in my Tab control. you see, i have 2 tabs in my form then inside it i i got a ListView. What i want to do is when a user clicks on the First Tab some buttons in my form will be disabled but if the user clicks the Second tab it will be Enabled. Please Check the code below.

Private Sub tabUsers_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles tabUsers.Click
        Call usersTabActive()
    End Sub

My Problem Is this. when i click the tabs nothing will happened or be disabled. unless you click a part of the tab where the ListView is. i want this to be automatic so the users will not be able to click on the buttons not nessesary for the Tab. Please help.


thanks

Private Sub TabControl1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles TabControl1.SelectedIndexChanged
        Select Case TabControl1.SelectedIndex
            Case 0
                MsgBox("Tab 1 Activated.")
            Case 1
                MsgBox("Tab 2 Activated.")
        End Select
    End Sub

hi! thanks for your help! i finnally got it working!:)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.