Position Cursor

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Suresh Kumaran

    #1

    Position Cursor

    Hi All,

    I have a form with 3 tab controls. Each tab control has
    its own text boxes placed. My question is how do I place
    the cursor in the first text box in the respective tab
    control as the user clicks from tab control to tab
    control.


    Appreciate help.



    SK


  • Sylvain Barde

    #2
    Re: Position Cursor

    Private Sub TabControl1_Sel ectedIndexChang ed(ByVal sender As System.Object,
    ByVal e As System.EventArg s) Handles TabControl1.Sel ectedIndexChang ed

    Select Case TabControl1.Sel ectedIndex

    Case 0

    TextBox1.Focus( )

    Case 1

    TextBox2.Focus( )

    End Select

    End Sub


    --
    Sylvain Barde

    MCP Microsoft Certified Professional
    MCT Microsoft Certified Trainer
    _______________ _______________ ___________



    MCSD Microsoft Certified Solution Developer
    "Suresh Kumaran" <kum_suresh@hot mail.com> a écrit dans le message de
    news:4a1401c376 35$cb9db340$a50 1280a@phx.gbl.. .[color=blue]
    > Hi All,
    >
    > I have a form with 3 tab controls. Each tab control has
    > its own text boxes placed. My question is how do I place
    > the cursor in the first text box in the respective tab
    > control as the user clicks from tab control to tab
    > control.
    >
    >
    > Appreciate help.
    >
    >
    >
    > SK
    >
    >[/color]


    Comment

    • Suresh Kumaran

      #3
      Re: Position Cursor

      Sylvain

      Thanks. It worked


      SK

      [color=blue]
      >-----Original Message-----
      >Private Sub TabControl1_Sel ectedIndexChang ed(ByVal sender [/color]
      As System.Object,[color=blue]
      >ByVal e As System.EventArg s) Handles [/color]
      TabControl1.Sel ectedIndexChang ed[color=blue]
      >
      > Select Case TabControl1.Sel ectedIndex
      >
      > Case 0
      >
      > TextBox1.Focus( )
      >
      > Case 1
      >
      > TextBox2.Focus( )
      >
      > End Select
      >
      >End Sub
      >
      >
      >--
      >Sylvain Barde
      >
      >MCP Microsoft Certified Professional
      >MCT Microsoft Certified Trainer
      >______________ _______________ ____________
      >
      >
      >
      >MCSD Microsoft Certified Solution Developer
      >"Suresh Kumaran" <kum_suresh@hot mail.com> a écrit dans le [/color]
      message de[color=blue]
      >news:4a1401c37 635$cb9db340$a5 01280a@phx.gbl. ..[color=green]
      >> Hi All,
      >>
      >> I have a form with 3 tab controls. Each tab control has
      >> its own text boxes placed. My question is how do I place
      >> the cursor in the first text box in the respective tab
      >> control as the user clicks from tab control to tab
      >> control.
      >>
      >>
      >> Appreciate help.
      >>
      >>
      >>
      >> SK
      >>
      >>[/color]
      >
      >
      >.
      >[/color]

      Comment

      Working...