Jump to content

Verificar TabPages

Recommended Posts


Bom dia,

Eu tenho num formulario algumas TabPages e agora queria verificar qual é a tab que está visivel.

o problema e que nao sei o que colocar...

do genero eu tenho

Select Case TabControl

Case tabpage1.'e agora não sei o que devo colocar a seguir!!!

alguem me pode dar uma ajuda pf???



"Innovation distinguishes between a leader and a follower." Steve jobs.

Share this post

Link to post
Share on other sites


É uma referência ao objecto TabPage que esteja seleccionado na TabControl1.

A partir daí, verificas com o que quiseres: nome, tag, bla bla

Sérgio Ribeiro

"Great coders aren't born. They're compiled and released"
"Expert coders do not need a keyboard. They just throw magnets at the RAM chips"

Share this post

Link to post
Share on other sites
Private Sub TabControl1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TabControl1.SelectedIndexChanged

        Select Case Me.TabControl1.SelectedIndex
            Case 0  'TabPage1
                MsgBox("TabPage 1")
            Case 1 'TabPage1
                MsgBox("TabPage 2")
            Case Else

        End Select
    End Sub

  • Vote 1

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.