Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. tabpage seting foucs

tabpage seting foucs

Scheduled Pinned Locked Moved Visual Basic
help
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    aynka2000
    wrote on last edited by
    #1

    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

    M 1 Reply Last reply
    0
    • A aynka2000

      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

      M Offline
      M Offline
      Matthew Hazlett
      wrote on last edited by
      #2

      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
      
      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups