0

So I have these two forms. On the 1st form, I have a button and on the 2nd form, I put a tabindex and created a two tab pages. If I click the the button, I want to go to the 2nd tabpage. here's my code..

TabPages2.show()

It doesn't work guys.. please help me guys. I'm still a noob... Thank you

3
Contributors
3
Replies
4
Views
6 Years
Discussion Span
Last Post by jefroxnergal
0

you need to show the 2nd form first before calling tabpage2.show.

dim objfrm as new form2
         objfrm.show()
         TabPages2.show()

im not sure abt TabPages2.show()
u may need to do activate or someother things.. try out

0

See if this helps. Place on Form1.

Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
        With Form2 '// shorten code.
            .TabControl1.SelectedTab = .TabPage2 '// select Tab.
            .ShowDialog() '// display as MsgBox, not giving access to previous Form until closed.
        End With
    End Sub
0

See if this helps. Place on Form1.

Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
        With Form2 '// shorten code.
            .TabControl1.SelectedTab = .TabPage2 '// select Tab.
            .ShowDialog() '// display as MsgBox, not giving access to previous Form until closed.
        End With
    End Sub

Hey men.. Thanks a lot.. It really works, I try it on a normal windows form but It doesn't work on mobile application... Maybe you can help me men... Thanks a lot...

Edited by jefroxnergal: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.