Me keyword

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

    Me keyword

    In Visual Basic .NET, does the Me keyword always refer to the current form?
  • Charles Law

    #2
    Re: Me keyword

    Hi Jim

    It refers to the current object. So if you are in a form then it is that
    form. If you are in a class then it is that instance of the class. It is the
    same as the C++/C# 'this'.

    HTH

    Charles


    "Jim" <anonymous@disc ussions.microso ft.com> wrote in message
    news:1FDB40A5-0017-4542-8C8E-6EA49AB41DC7@mi crosoft.com...[color=blue]
    > In Visual Basic .NET, does the Me keyword always refer to the current[/color]
    form?


    Comment

    • Charles Law

      #3
      Re: Me keyword

      Hi Jim

      It refers to the current object. So if you are in a form then it is that
      form. If you are in a class then it is that instance of the class. It is the
      same as the C++/C# 'this'.

      HTH

      Charles


      "Jim" <anonymous@disc ussions.microso ft.com> wrote in message
      news:1FDB40A5-0017-4542-8C8E-6EA49AB41DC7@mi crosoft.com...[color=blue]
      > In Visual Basic .NET, does the Me keyword always refer to the current[/color]
      form?


      Comment

      • Herfried K. Wagner [MVP]

        #4
        Re: Me keyword

        * =?Utf-8?B?Smlt?= <anonymous@disc ussions.microso ft.com> scripsit:[color=blue]
        > In Visual Basic .NET, does the Me keyword always refer to the current form?[/color]

        In addition to the other reply:

        If you need a reference to the active form, use 'Form.ActiveFor m'.

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

        Comment

        • Herfried K. Wagner [MVP]

          #5
          Re: Me keyword

          * =?Utf-8?B?Smlt?= <anonymous@disc ussions.microso ft.com> scripsit:[color=blue]
          > In Visual Basic .NET, does the Me keyword always refer to the current form?[/color]

          In addition to the other reply:

          If you need a reference to the active form, use 'Form.ActiveFor m'.

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

          Comment

          Working...