me.controls

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

    me.controls

    me.fraDate.Top = Me.Controls("fr a" & Me.cboDate.Text ).Top

    The top line is from vb6 how can I do the same thing in
    vb.net?

    fraDate is a panal
    me.cbodate is a combo box with a value of 1 - 6 in it.
    I also have 6 panals named fra1, fra2, fra3, etc.

    Thanks for the help!
  • Herfried K. Wagner [MVP]

    #2
    Re: me.controls

    * "craig" <anonymous@disc ussions.microso ft.com> scripsit:[color=blue]
    > me.fraDate.Top = Me.Controls("fr a" & Me.cboDate.Text ).Top
    >
    > The top line is from vb6 how can I do the same thing in
    > vb.net?[/color]

    Add all controls to a hashtable ('Hashtable'), the name as key and the
    value is the reference to the control.

    --
    Herfried K. Wagner [MVP]
    <http://www.mvps.org/dotnet>

    Comment

    • craig

      #3
      Re: me.controls

      come on there must be a way to refer to it directly as in
      vb6.
      [color=blue]
      >-----Original Message-----
      >* "craig" <anonymous@disc ussions.microso ft.com> scripsit:[color=green]
      >> me.fraDate.Top = Me.Controls("fr a" &[/color][/color]
      Me.cboDate.Text ).Top[color=blue][color=green]
      >>
      >> The top line is from vb6 how can I do the same thing[/color][/color]
      in[color=blue][color=green]
      >> vb.net?[/color]
      >
      >Add all controls to a hashtable ('Hashtable'), the name[/color]
      as key and the[color=blue]
      >value is the reference to the control.
      >
      >--
      >Herfried K. Wagner [MVP]
      ><http://www.mvps.org/dotnet>
      >.
      >[/color]

      Comment

      • Herfried K. Wagner [MVP]

        #4
        Re: me.controls

        * "craig" <anonymous@disc ussions.microso ft.com> scripsit:[color=blue]
        > come on there must be a way to refer to it directly as in
        > vb6.[/color]

        No, there is no direct way to refer to the controly by their name.

        --
        Herfried K. Wagner [MVP]
        <http://www.mvps.org/dotnet>

        Comment

        • Guest's Avatar

          #5
          Re: me.controls

          ok, so I dim a 2 dimential array? The first column being
          the number (1-6) and the second column being the name of
          the corresponding panal?

          What do I dim the arrary as a string? How do I use the
          array in a statment latter on in the program?

          Thanks for the help!
          [color=blue]
          >-----Original Message-----
          >* "craig" <anonymous@disc ussions.microso ft.com> scripsit:[color=green]
          >> come on there must be a way to refer to it directly as[/color][/color]
          in[color=blue][color=green]
          >> vb6.[/color]
          >
          >No, there is no direct way to refer to the controly by[/color]
          their name.[color=blue]
          >
          >--
          >Herfried K. Wagner [MVP]
          ><http://www.mvps.org/dotnet>
          >.
          >[/color]

          Comment

          • Herfried K. Wagner [MVP]

            #6
            Re: me.controls

            * <anonymous@disc ussions.microso ft.com> scripsit:[color=blue]
            > ok, so I dim a 2 dimential array? The first column being
            > the number (1-6) and the second column being the name of
            > the corresponding panal?
            >
            > What do I dim the arrary as a string? How do I use the
            > array in a statment latter on in the program?[/color]

            <http://groups.google.c om/groups?selm=bq5 rdn%241ramms%24 7%40ID-208219.news.uni-berlin.de>

            --
            Herfried K. Wagner [MVP]
            <http://www.mvps.org/dotnet>

            Comment

            • Ian

              #7
              Re: me.controls

              Hi,

              Kind of an aside, but a keyed Controls collection will be in the next
              version of Windows Forms.

              Ian

              "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
              news:bu44na$dl5 8c$2@ID-208219.news.uni-berlin.de...[color=blue]
              > * "craig" <anonymous@disc ussions.microso ft.com> scripsit:[color=green]
              > > come on there must be a way to refer to it directly as in
              > > vb6.[/color]
              >
              > No, there is no direct way to refer to the controly by their name.
              >
              > --
              > Herfried K. Wagner [MVP]
              > <http://www.mvps.org/dotnet>[/color]


              Comment

              Working...