what is a static property and a cursor question

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

    what is a static property and a cursor question

    I think I misread a post and understood that if I do:

    System.Windows. Forms.Cursor.Cu rrent = Cursors.WaitCur sor

    there is no need to reset the cursor to Default.



    So I made all the reset statements into comments (placed an ' in front)

    And everything works OK.



    Now I'm wondering why.

    Is it true that I do not need to reset the cursor or does leaving the sub do
    that - or why is mine working?



    Also, what is a static property. Is there only one value saved for the
    entire application, for all Cursors, or what?



    thanks for any clarifications








  • Ryan S. Thiele

    #2
    Re: what is a static property and a cursor question

    to awnser the static property question. You might actually mean a staic
    variable.

    The static keyword meand that the variable will keep it's value when the sub
    or function exits. This is used to declare at the sub level, and not at the
    class level.

    And yes for the cursor question. You have to set the cursor back to default
    :).

    --
    Thiele Enterprises - The Power Is In Your Hands Now!

    --
    " Franky" <frankyNOSPAM @a-znet.comwrote in message
    news:OFBj%236YE HHA.4680@TK2MSF TNGP04.phx.gbl. ..
    I think I misread a post and understood that if I do:

    System.Windows. Forms.Cursor.Cu rrent = Cursors.WaitCur sor

    there is no need to reset the cursor to Default.



    So I made all the reset statements into comments (placed an ' in front)

    And everything works OK.



    Now I'm wondering why.

    Is it true that I do not need to reset the cursor or does leaving the sub do
    that - or why is mine working?



    Also, what is a static property. Is there only one value saved for the
    entire application, for all Cursors, or what?



    thanks for any clarifications









    Comment

    • Franky

      #3
      Re: what is a static property and a cursor question



      "Ryan S. Thiele" <maligui@verizo n.netwrote in message
      news:5rpah.8374 $gJ1.4362@trndn y09...
      to awnser the static property question. You might actually mean a staic
      variable.
      >
      The static keyword meand that the variable will keep it's value when the
      sub
      or function exits. This is used to declare at the sub level, and not at
      the
      class level.
      System.Windows. Forms.Cursor.Cu rrent is a Static property - whatever that
      means!
      >
      And yes for the cursor question. You have to set the cursor back to
      default
      :).
      But I don't - in many places - and it works OK - I wonder why


      Thanks for the reply

      >
      --
      Thiele Enterprises - The Power Is In Your Hands Now!
      >
      --
      " Franky" <frankyNOSPAM @a-znet.comwrote in message
      news:OFBj%236YE HHA.4680@TK2MSF TNGP04.phx.gbl. ..
      I think I misread a post and understood that if I do:
      >
      System.Windows. Forms.Cursor.Cu rrent = Cursors.WaitCur sor
      >
      there is no need to reset the cursor to Default.
      >
      >
      >
      So I made all the reset statements into comments (placed an ' in front)
      >
      And everything works OK.
      >
      >
      >
      Now I'm wondering why.
      >
      Is it true that I do not need to reset the cursor or does leaving the sub
      do
      that - or why is mine working?
      >
      >
      >
      Also, what is a static property. Is there only one value saved for the
      entire application, for all Cursors, or what?
      >
      >
      >
      thanks for any clarifications
      >
      >
      >
      >
      >
      >
      >
      >
      >

      Comment

      • Ryan S. Thiele

        #4
        Re: what is a static property and a cursor question

        Static means just that. For example

        Public Sub DoWork()
        Static i as integer = 0
        i += 1 'You can also use i = i + 1
        End Sub

        Now, when oyu run the method. It will add one to i, making it 1. When you
        run the method again, it will again add 1 to i, making it 2.

        See how it keeps the value after the method has executed. The static
        variable stays in the memory.

        --
        Thiele Enterprises - The Power Is In Your Hands Now!

        --
        " Franky" <frankyNOSPAM @a-znet.comwrote in message
        ews:eKu$BcbEHHA .4112@TK2MSFTNG P03.phx.gbl...


        "Ryan S. Thiele" <maligui@verizo n.netwrote in message
        news:5rpah.8374 $gJ1.4362@trndn y09...
        to awnser the static property question. You might actually mean a staic
        variable.
        >
        The static keyword meand that the variable will keep it's value when the
        sub
        or function exits. This is used to declare at the sub level, and not at
        the
        class level.
        System.Windows. Forms.Cursor.Cu rrent is a Static property - whatever that
        means!
        >
        And yes for the cursor question. You have to set the cursor back to
        default
        :).
        But I don't - in many places - and it works OK - I wonder why


        Thanks for the reply

        >
        --
        Thiele Enterprises - The Power Is In Your Hands Now!
        >
        --
        " Franky" <frankyNOSPAM @a-znet.comwrote in message
        news:OFBj%236YE HHA.4680@TK2MSF TNGP04.phx.gbl. ..
        I think I misread a post and understood that if I do:
        >
        System.Windows. Forms.Cursor.Cu rrent = Cursors.WaitCur sor
        >
        there is no need to reset the cursor to Default.
        >
        >
        >
        So I made all the reset statements into comments (placed an ' in front)
        >
        And everything works OK.
        >
        >
        >
        Now I'm wondering why.
        >
        Is it true that I do not need to reset the cursor or does leaving the sub
        do
        that - or why is mine working?
        >
        >
        >
        Also, what is a static property. Is there only one value saved for the
        entire application, for all Cursors, or what?
        >
        >
        >
        thanks for any clarifications
        >
        >
        >
        >
        >
        >
        >
        >
        >


        Comment

        • Franky

          #5
          Re: what is a static property and a cursor question

          I see what the problem is. I'm asking what the static property means and
          that can be taken two ways.
          I understand the static property of a variable.

          What I wanted to ask is what does

          Static Property zzz....

          mean


          System.Windows. Forms.Cursor.Cu rrent

          the property Current is Static

          what does that mean?



          Thanks




          "Ryan S. Thiele" <maligui@verizo n.netwrote in message
          news:RVAah.8082 $IW2.1403@trndn y03...
          Static means just that. For example
          >
          Public Sub DoWork()
          Static i as integer = 0
          i += 1 'You can also use i = i + 1
          End Sub
          >
          Now, when oyu run the method. It will add one to i, making it 1. When you
          run the method again, it will again add 1 to i, making it 2.
          >
          See how it keeps the value after the method has executed. The static
          variable stays in the memory.
          >
          --
          Thiele Enterprises - The Power Is In Your Hands Now!
          >
          --
          " Franky" <frankyNOSPAM @a-znet.comwrote in message
          ews:eKu$BcbEHHA .4112@TK2MSFTNG P03.phx.gbl...
          >
          >
          "Ryan S. Thiele" <maligui@verizo n.netwrote in message
          news:5rpah.8374 $gJ1.4362@trndn y09...
          >to awnser the static property question. You might actually mean a staic
          >variable.
          >>
          >The static keyword meand that the variable will keep it's value when the
          >sub
          >or function exits. This is used to declare at the sub level, and not at
          >the
          >class level.
          >
          System.Windows. Forms.Cursor.Cu rrent is a Static property - whatever that
          means!
          >
          >>
          >And yes for the cursor question. You have to set the cursor back to
          >default
          >:).
          >
          But I don't - in many places - and it works OK - I wonder why
          >
          >
          Thanks for the reply
          >
          >
          >>
          >--
          >Thiele Enterprises - The Power Is In Your Hands Now!
          >>
          >--
          >" Franky" <frankyNOSPAM @a-znet.comwrote in message
          >news:OFBj%236Y EHHA.4680@TK2MS FTNGP04.phx.gbl ...
          >I think I misread a post and understood that if I do:
          >>
          >System.Windows .Forms.Cursor.C urrent = Cursors.WaitCur sor
          >>
          >there is no need to reset the cursor to Default.
          >>
          >>
          >>
          >So I made all the reset statements into comments (placed an ' in front)
          >>
          >And everything works OK.
          >>
          >>
          >>
          >Now I'm wondering why.
          >>
          >Is it true that I do not need to reset the cursor or does leaving the sub
          >do
          >that - or why is mine working?
          >>
          >>
          >>
          >Also, what is a static property. Is there only one value saved for the
          >entire application, for all Cursors, or what?
          >>
          >>
          >>
          >thanks for any clarifications
          >>
          >>
          >>
          >>
          >>
          >>
          >>
          >>
          >>
          >
          >
          >

          Comment

          • Ryan S. Thiele

            #6
            Re: what is a static property and a cursor question

            It means you can change or access it anywhere in the program. It is help in
            the memory at a global level.

            --
            Thiele Enterprises - The Power Is In Your Hands Now!

            --
            " Franky" <frankyNOSPAM @a-znet.comwrote in message
            news:eC176ziEHH A.3768@TK2MSFTN GP06.phx.gbl...
            I see what the problem is. I'm asking what the static property means and
            that can be taken two ways.
            I understand the static property of a variable.

            What I wanted to ask is what does

            Static Property zzz....

            mean


            System.Windows. Forms.Cursor.Cu rrent

            the property Current is Static

            what does that mean?



            Thanks




            "Ryan S. Thiele" <maligui@verizo n.netwrote in message
            news:RVAah.8082 $IW2.1403@trndn y03...
            Static means just that. For example
            >
            Public Sub DoWork()
            Static i as integer = 0
            i += 1 'You can also use i = i + 1
            End Sub
            >
            Now, when oyu run the method. It will add one to i, making it 1. When you
            run the method again, it will again add 1 to i, making it 2.
            >
            See how it keeps the value after the method has executed. The static
            variable stays in the memory.
            >
            --
            Thiele Enterprises - The Power Is In Your Hands Now!
            >
            --
            " Franky" <frankyNOSPAM @a-znet.comwrote in message
            ews:eKu$BcbEHHA .4112@TK2MSFTNG P03.phx.gbl...
            >
            >
            "Ryan S. Thiele" <maligui@verizo n.netwrote in message
            news:5rpah.8374 $gJ1.4362@trndn y09...
            >to awnser the static property question. You might actually mean a staic
            >variable.
            >>
            >The static keyword meand that the variable will keep it's value when the
            >sub
            >or function exits. This is used to declare at the sub level, and not at
            >the
            >class level.
            >
            System.Windows. Forms.Cursor.Cu rrent is a Static property - whatever that
            means!
            >
            >>
            >And yes for the cursor question. You have to set the cursor back to
            >default
            >:).
            >
            But I don't - in many places - and it works OK - I wonder why
            >
            >
            Thanks for the reply
            >
            >
            >>
            >--
            >Thiele Enterprises - The Power Is In Your Hands Now!
            >>
            >--
            >" Franky" <frankyNOSPAM @a-znet.comwrote in message
            >news:OFBj%236Y EHHA.4680@TK2MS FTNGP04.phx.gbl ...
            >I think I misread a post and understood that if I do:
            >>
            >System.Windows .Forms.Cursor.C urrent = Cursors.WaitCur sor
            >>
            >there is no need to reset the cursor to Default.
            >>
            >>
            >>
            >So I made all the reset statements into comments (placed an ' in front)
            >>
            >And everything works OK.
            >>
            >>
            >>
            >Now I'm wondering why.
            >>
            >Is it true that I do not need to reset the cursor or does leaving the sub
            >do
            >that - or why is mine working?
            >>
            >>
            >>
            >Also, what is a static property. Is there only one value saved for the
            >entire application, for all Cursors, or what?
            >>
            >>
            >>
            >thanks for any clarifications
            >>
            >>
            >>
            >>
            >>
            >>
            >>
            >>
            >>
            >
            >
            >


            Comment

            • Franky

              #7
              Re: what is a static property and a cursor question


              "Ryan S. Thiele" <maligui@verizo n.netwrote in message
              news:LlCah.1013 5$d42.2107@trnd ny07...
              It means you can change or access it anywhere in the program. It is help
              in
              the memory at a global level.
              >
              In contrast to having to create an instance of the class first. It must
              apply to all instances (I guess).

              thanks


              Comment

              • Cor Ligthert [MVP]

                #8
                Re: what is a static property and a cursor question

                Franky,

                Don't mix up the use of the old C++ keyword static what is used in C# as
                well.

                In VB.Net this is "Shared" the declared word can be used shared and exactly
                as that means by all classes in your program. The static keyword is as
                declared above it is static inside a method.

                Cor

                " Franky" <frankyNOSPAM @a-znet.comschreef in bericht
                news:eC176ziEHH A.3768@TK2MSFTN GP06.phx.gbl...
                >I see what the problem is. I'm asking what the static property means and
                >that can be taken two ways.
                I understand the static property of a variable.
                >
                What I wanted to ask is what does
                >
                Static Property zzz....
                >
                mean
                >
                >
                System.Windows. Forms.Cursor.Cu rrent
                >
                the property Current is Static
                >
                what does that mean?
                >
                >
                >
                Thanks
                >
                >
                >
                >
                "Ryan S. Thiele" <maligui@verizo n.netwrote in message
                news:RVAah.8082 $IW2.1403@trndn y03...
                >Static means just that. For example
                >>
                >Public Sub DoWork()
                > Static i as integer = 0
                > i += 1 'You can also use i = i + 1
                >End Sub
                >>
                >Now, when oyu run the method. It will add one to i, making it 1. When you
                >run the method again, it will again add 1 to i, making it 2.
                >>
                >See how it keeps the value after the method has executed. The static
                >variable stays in the memory.
                >>
                >--
                >Thiele Enterprises - The Power Is In Your Hands Now!
                >>
                >--
                >" Franky" <frankyNOSPAM @a-znet.comwrote in message
                >ews:eKu$BcbEHH A.4112@TK2MSFTN GP03.phx.gbl...
                >>
                >>
                >"Ryan S. Thiele" <maligui@verizo n.netwrote in message
                >news:5rpah.837 4$gJ1.4362@trnd ny09...
                >>to awnser the static property question. You might actually mean a staic
                >>variable.
                >>>
                >>The static keyword meand that the variable will keep it's value when the
                >>sub
                >>or function exits. This is used to declare at the sub level, and not at
                >>the
                >>class level.
                >>
                >System.Windows .Forms.Cursor.C urrent is a Static property - whatever that
                >means!
                >>
                >>>
                >>And yes for the cursor question. You have to set the cursor back to
                >>default
                >>:).
                >>
                >But I don't - in many places - and it works OK - I wonder why
                >>
                >>
                >Thanks for the reply
                >>
                >>
                >>>
                >>--
                >>Thiele Enterprises - The Power Is In Your Hands Now!
                >>>
                >>--
                >>" Franky" <frankyNOSPAM @a-znet.comwrote in message
                >>news:OFBj%236 YEHHA.4680@TK2M SFTNGP04.phx.gb l...
                >>I think I misread a post and understood that if I do:
                >>>
                >>System.Window s.Forms.Cursor. Current = Cursors.WaitCur sor
                >>>
                >>there is no need to reset the cursor to Default.
                >>>
                >>>
                >>>
                >>So I made all the reset statements into comments (placed an ' in front)
                >>>
                >>And everything works OK.
                >>>
                >>>
                >>>
                >>Now I'm wondering why.
                >>>
                >>Is it true that I do not need to reset the cursor or does leaving the
                >>sub
                >>do
                >>that - or why is mine working?
                >>>
                >>>
                >>>
                >>Also, what is a static property. Is there only one value saved for the
                >>entire application, for all Cursors, or what?
                >>>
                >>>
                >>>
                >>thanks for any clarifications
                >>>
                >>>
                >>>
                >>>
                >>>
                >>>
                >>>
                >>>
                >>>
                >>
                >>
                >>
                >
                >

                Comment

                • Franky

                  #9
                  Re: what is a static property and a cursor question

                  Thanks Cor

                  Didn't you mean
                  as that means by all objects in your program
                  "Cor Ligthert [MVP]" <notmyfirstname @planet.nlwrote in message
                  news:Oc6IqTxEHH A.4120@TK2MSFTN GP02.phx.gbl...
                  Franky,
                  >
                  Don't mix up the use of the old C++ keyword static what is used in C# as
                  well.
                  >
                  In VB.Net this is "Shared" the declared word can be used shared and
                  exactly as that means by all classes in your program. The static keyword
                  is as declared above it is static inside a method.
                  >
                  Cor
                  >
                  " Franky" <frankyNOSPAM @a-znet.comschreef in bericht
                  news:eC176ziEHH A.3768@TK2MSFTN GP06.phx.gbl...
                  >>I see what the problem is. I'm asking what the static property means and
                  >>that can be taken two ways.
                  >I understand the static property of a variable.
                  >>
                  >What I wanted to ask is what does
                  >>
                  >Static Property zzz....
                  >>
                  >mean
                  >>
                  >>
                  >System.Windows .Forms.Cursor.C urrent
                  >>
                  >the property Current is Static
                  >>
                  >what does that mean?
                  >>
                  >>
                  >>
                  >Thanks
                  >>
                  >>
                  >>
                  >>
                  >"Ryan S. Thiele" <maligui@verizo n.netwrote in message
                  >news:RVAah.808 2$IW2.1403@trnd ny03...
                  >>Static means just that. For example
                  >>>
                  >>Public Sub DoWork()
                  >> Static i as integer = 0
                  >> i += 1 'You can also use i = i + 1
                  >>End Sub
                  >>>
                  >>Now, when oyu run the method. It will add one to i, making it 1. When
                  >>you
                  >>run the method again, it will again add 1 to i, making it 2.
                  >>>
                  >>See how it keeps the value after the method has executed. The static
                  >>variable stays in the memory.
                  >>>
                  >>--
                  >>Thiele Enterprises - The Power Is In Your Hands Now!
                  >>>
                  >>--
                  >>" Franky" <frankyNOSPAM @a-znet.comwrote in message
                  >>ews:eKu$BcbEH HA.4112@TK2MSFT NGP03.phx.gbl.. .
                  >>>
                  >>>
                  >>"Ryan S. Thiele" <maligui@verizo n.netwrote in message
                  >>news:5rpah.83 74$gJ1.4362@trn dny09...
                  >>>to awnser the static property question. You might actually mean a staic
                  >>>variable.
                  >>>>
                  >>>The static keyword meand that the variable will keep it's value when
                  >>>the
                  >>>sub
                  >>>or function exits. This is used to declare at the sub level, and not at
                  >>>the
                  >>>class level.
                  >>>
                  >>System.Window s.Forms.Cursor. Current is a Static property - whatever that
                  >>means!
                  >>>
                  >>>>
                  >>>And yes for the cursor question. You have to set the cursor back to
                  >>>default
                  >>>:).
                  >>>
                  >>But I don't - in many places - and it works OK - I wonder why
                  >>>
                  >>>
                  >>Thanks for the reply
                  >>>
                  >>>
                  >>>>
                  >>>--
                  >>>Thiele Enterprises - The Power Is In Your Hands Now!
                  >>>>
                  >>>--
                  >>>" Franky" <frankyNOSPAM @a-znet.comwrote in message
                  >>>news:OFBj%23 6YEHHA.4680@TK2 MSFTNGP04.phx.g bl...
                  >>>I think I misread a post and understood that if I do:
                  >>>>
                  >>>System.Windo ws.Forms.Cursor .Current = Cursors.WaitCur sor
                  >>>>
                  >>>there is no need to reset the cursor to Default.
                  >>>>
                  >>>>
                  >>>>
                  >>>So I made all the reset statements into comments (placed an ' in front)
                  >>>>
                  >>>And everything works OK.
                  >>>>
                  >>>>
                  >>>>
                  >>>Now I'm wondering why.
                  >>>>
                  >>>Is it true that I do not need to reset the cursor or does leaving the
                  >>>sub
                  >>>do
                  >>>that - or why is mine working?
                  >>>>
                  >>>>
                  >>>>
                  >>>Also, what is a static property. Is there only one value saved for the
                  >>>entire application, for all Cursors, or what?
                  >>>>
                  >>>>
                  >>>>
                  >>>thanks for any clarifications
                  >>>>
                  >>>>
                  >>>>
                  >>>>
                  >>>>
                  >>>>
                  >>>>
                  >>>>
                  >>>>
                  >>>
                  >>>
                  >>>
                  >>
                  >>
                  >
                  >

                  Comment

                  • Cor Ligthert [MVP]

                    #10
                    Re: what is a static property and a cursor question

                    Exactly I took the popular tongue.

                    Although it is as well for all "shared classes" and modules (which are in
                    fact the same).

                    :-)

                    Cor

                    " Franky" <frankyNOSPAM @a-znet.comschreef in bericht
                    news:ehRE6r1EHH A.4404@TK2MSFTN GP06.phx.gbl...
                    Thanks Cor
                    >
                    Didn't you mean
                    >
                    >as that means by all objects in your program
                    >
                    "Cor Ligthert [MVP]" <notmyfirstname @planet.nlwrote in message
                    news:Oc6IqTxEHH A.4120@TK2MSFTN GP02.phx.gbl...
                    >Franky,
                    >>
                    >Don't mix up the use of the old C++ keyword static what is used in C# as
                    >well.
                    >>
                    >In VB.Net this is "Shared" the declared word can be used shared and
                    >exactly as that means by all classes in your program. The static keyword
                    >is as declared above it is static inside a method.
                    >>
                    >Cor
                    >>
                    >" Franky" <frankyNOSPAM @a-znet.comschreef in bericht
                    >news:eC176ziEH HA.3768@TK2MSFT NGP06.phx.gbl.. .
                    >>>I see what the problem is. I'm asking what the static property means and
                    >>>that can be taken two ways.
                    >>I understand the static property of a variable.
                    >>>
                    >>What I wanted to ask is what does
                    >>>
                    >>Static Property zzz....
                    >>>
                    >>mean
                    >>>
                    >>>
                    >>System.Window s.Forms.Cursor. Current
                    >>>
                    >>the property Current is Static
                    >>>
                    >>what does that mean?
                    >>>
                    >>>
                    >>>
                    >>Thanks
                    >>>
                    >>>
                    >>>
                    >>>
                    >>"Ryan S. Thiele" <maligui@verizo n.netwrote in message
                    >>news:RVAah.80 82$IW2.1403@trn dny03...
                    >>>Static means just that. For example
                    >>>>
                    >>>Public Sub DoWork()
                    >>> Static i as integer = 0
                    >>> i += 1 'You can also use i = i + 1
                    >>>End Sub
                    >>>>
                    >>>Now, when oyu run the method. It will add one to i, making it 1. When
                    >>>you
                    >>>run the method again, it will again add 1 to i, making it 2.
                    >>>>
                    >>>See how it keeps the value after the method has executed. The static
                    >>>variable stays in the memory.
                    >>>>
                    >>>--
                    >>>Thiele Enterprises - The Power Is In Your Hands Now!
                    >>>>
                    >>>--
                    >>>" Franky" <frankyNOSPAM @a-znet.comwrote in message
                    >>>ews:eKu$BcbE HHA.4112@TK2MSF TNGP03.phx.gbl. ..
                    >>>>
                    >>>>
                    >>>"Ryan S. Thiele" <maligui@verizo n.netwrote in message
                    >>>news:5rpah.8 374$gJ1.4362@tr ndny09...
                    >>>>to awnser the static property question. You might actually mean a
                    >>>>staic
                    >>>>variable.
                    >>>>>
                    >>>>The static keyword meand that the variable will keep it's value when
                    >>>>the
                    >>>>sub
                    >>>>or function exits. This is used to declare at the sub level, and not
                    >>>>at
                    >>>>the
                    >>>>class level.
                    >>>>
                    >>>System.Windo ws.Forms.Cursor .Current is a Static property - whatever
                    >>>that
                    >>>means!
                    >>>>
                    >>>>>
                    >>>>And yes for the cursor question. You have to set the cursor back to
                    >>>>default
                    >>>>:).
                    >>>>
                    >>>But I don't - in many places - and it works OK - I wonder why
                    >>>>
                    >>>>
                    >>>Thanks for the reply
                    >>>>
                    >>>>
                    >>>>>
                    >>>>--
                    >>>>Thiele Enterprises - The Power Is In Your Hands Now!
                    >>>>>
                    >>>>--
                    >>>>" Franky" <frankyNOSPAM @a-znet.comwrote in message
                    >>>>news:OFBj%2 36YEHHA.4680@TK 2MSFTNGP04.phx. gbl...
                    >>>>I think I misread a post and understood that if I do:
                    >>>>>
                    >>>>System.Wind ows.Forms.Curso r.Current = Cursors.WaitCur sor
                    >>>>>
                    >>>>there is no need to reset the cursor to Default.
                    >>>>>
                    >>>>>
                    >>>>>
                    >>>>So I made all the reset statements into comments (placed an ' in
                    >>>>front)
                    >>>>>
                    >>>>And everything works OK.
                    >>>>>
                    >>>>>
                    >>>>>
                    >>>>Now I'm wondering why.
                    >>>>>
                    >>>>Is it true that I do not need to reset the cursor or does leaving the
                    >>>>sub
                    >>>>do
                    >>>>that - or why is mine working?
                    >>>>>
                    >>>>>
                    >>>>>
                    >>>>Also, what is a static property. Is there only one value saved for the
                    >>>>entire application, for all Cursors, or what?
                    >>>>>
                    >>>>>
                    >>>>>
                    >>>>thanks for any clarifications
                    >>>>>
                    >>>>>
                    >>>>>
                    >>>>>
                    >>>>>
                    >>>>>
                    >>>>>
                    >>>>>
                    >>>>>
                    >>>>
                    >>>>
                    >>>>
                    >>>
                    >>>
                    >>
                    >>
                    >
                    >

                    Comment

                    • Franky

                      #11
                      Re: what is a static property and a cursor question

                      I think we took care of that.

                      Now if I can find some doc on MSScriptControl .ScriptControlC lass I'd feel
                      like I'm moving on.

                      THANKS



                      "Cor Ligthert [MVP]" <notmyfirstname @planet.nlwrote in message
                      news:uW0id52EHH A.4208@TK2MSFTN GP03.phx.gbl...
                      Exactly I took the popular tongue.
                      >
                      Although it is as well for all "shared classes" and modules (which are in
                      fact the same).
                      >
                      :-)
                      >
                      Cor
                      >
                      " Franky" <frankyNOSPAM @a-znet.comschreef in bericht
                      news:ehRE6r1EHH A.4404@TK2MSFTN GP06.phx.gbl...
                      >Thanks Cor
                      >>
                      >Didn't you mean
                      >>
                      >>as that means by all objects in your program
                      >>
                      >"Cor Ligthert [MVP]" <notmyfirstname @planet.nlwrote in message
                      >news:Oc6IqTxEH HA.4120@TK2MSFT NGP02.phx.gbl.. .
                      >>Franky,
                      >>>
                      >>Don't mix up the use of the old C++ keyword static what is used in C# as
                      >>well.
                      >>>
                      >>In VB.Net this is "Shared" the declared word can be used shared and
                      >>exactly as that means by all classes in your program. The static keyword
                      >>is as declared above it is static inside a method.
                      >>>
                      >>Cor
                      >>>
                      >>" Franky" <frankyNOSPAM @a-znet.comschreef in bericht
                      >>news:eC176ziE HHA.3768@TK2MSF TNGP06.phx.gbl. ..
                      >>>>I see what the problem is. I'm asking what the static property means and
                      >>>>that can be taken two ways.
                      >>>I understand the static property of a variable.
                      >>>>
                      >>>What I wanted to ask is what does
                      >>>>
                      >>>Static Property zzz....
                      >>>>
                      >>>mean
                      >>>>
                      >>>>
                      >>>System.Windo ws.Forms.Cursor .Current
                      >>>>
                      >>>the property Current is Static
                      >>>>
                      >>>what does that mean?
                      >>>>
                      >>>>
                      >>>>
                      >>>Thanks
                      >>>>
                      >>>>
                      >>>>
                      >>>>
                      >>>"Ryan S. Thiele" <maligui@verizo n.netwrote in message
                      >>>news:RVAah.8 082$IW2.1403@tr ndny03...
                      >>>>Static means just that. For example
                      >>>>>
                      >>>>Public Sub DoWork()
                      >>>> Static i as integer = 0
                      >>>> i += 1 'You can also use i = i + 1
                      >>>>End Sub
                      >>>>>
                      >>>>Now, when oyu run the method. It will add one to i, making it 1. When
                      >>>>you
                      >>>>run the method again, it will again add 1 to i, making it 2.
                      >>>>>
                      >>>>See how it keeps the value after the method has executed. The static
                      >>>>variable stays in the memory.
                      >>>>>
                      >>>>--
                      >>>>Thiele Enterprises - The Power Is In Your Hands Now!
                      >>>>>
                      >>>>--
                      >>>>" Franky" <frankyNOSPAM @a-znet.comwrote in message
                      >>>>ews:eKu$Bcb EHHA.4112@TK2MS FTNGP03.phx.gbl ...
                      >>>>>
                      >>>>>
                      >>>>"Ryan S. Thiele" <maligui@verizo n.netwrote in message
                      >>>>news:5rpah. 8374$gJ1.4362@t rndny09...
                      >>>>>to awnser the static property question. You might actually mean a
                      >>>>>staic
                      >>>>>variable .
                      >>>>>>
                      >>>>>The static keyword meand that the variable will keep it's value when
                      >>>>>the
                      >>>>>sub
                      >>>>>or function exits. This is used to declare at the sub level, and not
                      >>>>>at
                      >>>>>the
                      >>>>>class level.
                      >>>>>
                      >>>>System.Wind ows.Forms.Curso r.Current is a Static property - whatever
                      >>>>that
                      >>>>means!
                      >>>>>
                      >>>>>>
                      >>>>>And yes for the cursor question. You have to set the cursor back to
                      >>>>>default
                      >>>>>:).
                      >>>>>
                      >>>>But I don't - in many places - and it works OK - I wonder why
                      >>>>>
                      >>>>>
                      >>>>Thanks for the reply
                      >>>>>
                      >>>>>
                      >>>>>>
                      >>>>>--
                      >>>>>Thiele Enterprises - The Power Is In Your Hands Now!
                      >>>>>>
                      >>>>>--
                      >>>>>" Franky" <frankyNOSPAM @a-znet.comwrote in message
                      >>>>>news:OFBj% 236YEHHA.4680@T K2MSFTNGP04.phx .gbl...
                      >>>>>I think I misread a post and understood that if I do:
                      >>>>>>
                      >>>>>System.Win dows.Forms.Curs or.Current = Cursors.WaitCur sor
                      >>>>>>
                      >>>>>there is no need to reset the cursor to Default.
                      >>>>>>
                      >>>>>>
                      >>>>>>
                      >>>>>So I made all the reset statements into comments (placed an ' in
                      >>>>>front)
                      >>>>>>
                      >>>>>And everything works OK.
                      >>>>>>
                      >>>>>>
                      >>>>>>
                      >>>>>Now I'm wondering why.
                      >>>>>>
                      >>>>>Is it true that I do not need to reset the cursor or does leaving the
                      >>>>>sub
                      >>>>>do
                      >>>>>that - or why is mine working?
                      >>>>>>
                      >>>>>>
                      >>>>>>
                      >>>>>Also, what is a static property. Is there only one value saved for
                      >>>>>the
                      >>>>>entire application, for all Cursors, or what?
                      >>>>>>
                      >>>>>>
                      >>>>>>
                      >>>>>thanks for any clarifications
                      >>>>>>
                      >>>>>>
                      >>>>>>
                      >>>>>>
                      >>>>>>
                      >>>>>>
                      >>>>>>
                      >>>>>>
                      >>>>>>
                      >>>>>
                      >>>>>
                      >>>>>
                      >>>>
                      >>>>
                      >>>
                      >>>
                      >>
                      >>
                      >
                      >

                      Comment

                      Working...