0

First of all I want to thank "codeorder" for sharing me this code..

Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
        With Form2 
            .TabControl1.SelectedTab = .TabPage2 
            .ShowDialog() 
        End With
    End Sub

This code actually works in normal windows form but when I try to implement this code to mobile application form, it doesn't work and it has error 'SelectedTab' is not a member of 'System.Windows.Forms.TabControl'.. Please help me guys... Thanks

2
Contributors
2
Replies
3
Views
5 Years
Discussion Span
Last Post by jefroxnergal
0

You can use "SelectedIndexChanged" from TabControl on Mobile Device:

Private Sub MainTabControl_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MainTabControl.SelectedIndexChanged

' 1. Tab
If MainTabControl.SelectedIndex = 0 Then
MsgBox ("Hello From Tab 1")
End If

' 2. Tab
If MainTabControl.SelectedIndex = 1 Then
MsgBox ("Hello From Tab 2")
End If

' 3. Tab
If MainTabControl.SelectedIndex = 2 Then
MsgBox ("Hello From Tab 3")
End If

.................
.................
.................
End Sub

Edited by kaplanerkan: n/a

0

You can use "SelectedIndexChanged" from TabControl on Mobile Device:

Private Sub MainTabControl_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MainTabControl.SelectedIndexChanged

' 1. Tab
If MainTabControl.SelectedIndex = 0 Then
MsgBox ("Hello From Tab 1")
End If

' 2. Tab
If MainTabControl.SelectedIndex = 1 Then
MsgBox ("Hello From Tab 2")
End If

' 3. Tab
If MainTabControl.SelectedIndex = 2 Then
MsgBox ("Hello From Tab 3")
End If

.................
.................
.................
End Sub

It doesn't work dude...huhu.. :(

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.