tabpage seting foucs
Visual Basic
2
Posts
2
Posters
0
Views
1
Watching
-
In tab control the are 3 tab page when i click a button with is in tabpage 1 i have written(tabpage3.focus) the focus to go to tabpage 3 but its not going what can i do pls help
Are you talking about when you right click on a tab setting it to focused before you "do stuff" to the tabpage. If so I was having this problem the other day and fixed it with a little workaround.
'------------------------------------------------------------------------ ' A backhanded way to get the tab we clicked on ' Private Sub tabFromClick(ByVal e As System.Windows.Forms.MouseEventArgs) Dim thisTab As Integer For thisTab = 0 To Me.TabCount - 1 Dim tabRect As Rectangle = Me.GetTabRect(thisTab) If tabRect.Contains(New Point(e.X, e.Y)) Then Me.SelectedIndex = thisTab End If Next End Sub