Announcement

Collapse
No announcement yet.

VB.net

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • VB.net

    i know some of you program in this...i do to but this is one solution i cant figure out.....i need a counter that i can display out on label......it needs to advance every 8 ticks every second....for every second it must count 8 and then output...

    i can do the output but i cant figure out the clock part....if someone can help me with that part that would be great....
    that sounds like a good idea trooper.
    -Vulcan

  • #2
    Re: VB.net

    Originally posted by Trooper[SNPR]
    i know some of you program in this...i do to but this is one solution i cant figure out.....i need a counter that i can display out on label......it needs to advance every 8 ticks every second....for every second it must count 8 and then output...

    i can do the output but i cant figure out the clock part....if someone can help me with that part that would be great....
    You can use the System.Windows.Forms.Timer class, which allows you to specify an Interval and execute code you write every time the interval passes.

    1. Create the Forms project.
    2. Add a "counter" member (Integer;0) to the Form1 class. You'll later increment this by 8 every second and then display it.
    3. Add to the form a Label object (Label1), and set its Text property to "0".
    4. Add to the form a Timer object (Timer1; you can find it in the same Toolbar on the left as the Label object).
    5. The Timer1 object will appear in the Design window, just below the Form. You'll need to change a couple of Timer1's properties. Find the Properties pane/tab for Timer1.
    6. Expand the "Dynamic Properties" node of Timer1's properties pane/tab. You'll see an "Advanced Dynamic Properties" property.
    7. Open the Properties Builder for Timer1's "Advanced Dynamic Properties".
    8. Enable these two properties: "Enabled" and "Interval" (you're just saying it HAS an interval for now -- we'll SET the interval soon).
    9. Click OK to close the Property Builder.
    10. You'll now see two properties under the "Behavior" section of Timer1's properties. In this section, set "Enabled" to "True" and "Interval" to "1000".
    11. In the Design window, double-click on the Timer1 object. The code for the "Timer1_Tick" sub will be displayed. This sub fires once per Interval (which you specified in step 10).
    12. Place in "Timer1_Tick" the code which sets the Label1.Text value to that of "counter" and then increments "counter" by 8.
    13. Run the program and observe Label1 incrementing by 8 every second.

    Let me know what questions you have.
    Steam Community? Add me. | Free Remote, Encrypted Backup

    Darkilla: In short, NS is pretty much really fast chess. With guns. Apophis: I haven't seen anyone say that SM's are better than non-SMs. Nordbomber: This is THE first server I've seen where either side can comeback from out of seemingly nowhere with the right teamwork. en4rcment: I have NEVER experienced the type of gameplay that I have found here. Nightly I am amazed at the personalities and gaming talent. Zephyr: Apophis is clearly a highly sophisticated self-aware AI construct that runs on a highly modified toaster oven in Wyzcrak's basement.

    Comment


    • #3
      Re: VB.net

      yeah what he said

      Comment


      • #4
        Re: VB.net

        okay here is the code i have put in

        Dim counter As Integer
        counter = 8
        Me.Label1.Text = counter


        counter = +8


        it will display the 8 once then nothing happens....tried doing a loop but that dint work so im not sure whats wrong with it...
        that sounds like a good idea trooper.
        -Vulcan

        Comment


        • #5
          Re: VB.net

          You saw my post?

          Zip up your project in a zip file and attach or link it here. I'll look at it.
          Steam Community? Add me. | Free Remote, Encrypted Backup

          Darkilla: In short, NS is pretty much really fast chess. With guns. Apophis: I haven't seen anyone say that SM's are better than non-SMs. Nordbomber: This is THE first server I've seen where either side can comeback from out of seemingly nowhere with the right teamwork. en4rcment: I have NEVER experienced the type of gameplay that I have found here. Nightly I am amazed at the personalities and gaming talent. Zephyr: Apophis is clearly a highly sophisticated self-aware AI construct that runs on a highly modified toaster oven in Wyzcrak's basement.

          Comment


          • #6
            Re: VB.net

            yah i did exactly what was posted in that post....ill do that..
            Last edited by Trooper; 04-05-2006, 08:58 PM.
            that sounds like a good idea trooper.
            -Vulcan

            Comment


            • #7
              Re: VB.net

              Your code has nothing to do with what Wyz is talking about LOL. Trooper, get back on AA and start TKing people :)
              .



              [Game rules, announcements, and SOPs ][ ][ ][ ]
              "The success of what we do depends upon people valuing the team over themselves."
              - Wulfyn

              Comment


              • #8
                Re: VB.net

                you are the first one to get it
                that sounds like a good idea trooper.
                -Vulcan

                Comment


                • #9
                  Re: VB.net

                  Sure, just don't ever let me catch myself hiring you to make a time bomb :)
                  .



                  [Game rules, announcements, and SOPs ][ ][ ][ ]
                  "The success of what we do depends upon people valuing the team over themselves."
                  - Wulfyn

                  Comment


                  • #10
                    Re: VB.net

                    Originally posted by Trooper[SNPR]
                    yah i did exactly what was posted in that post....
                    No, you didn't.
                    2. Add a "counter" member (Integer;0) to the Form1 class. You'll later increment this by 8 every second and then display it.
                    You added a variable CALLED "counter" to the "Timer1_Tick" sub. The problem with doing that (which is not what's quoted above) is that "counter"'s value is reset every second. Declare "counter" (Dim counter As Integer) ABOVE (that is, outside of) "Timer1_Tick" and run your code again, changing nothing else.
                    Steam Community? Add me. | Free Remote, Encrypted Backup

                    Darkilla: In short, NS is pretty much really fast chess. With guns. Apophis: I haven't seen anyone say that SM's are better than non-SMs. Nordbomber: This is THE first server I've seen where either side can comeback from out of seemingly nowhere with the right teamwork. en4rcment: I have NEVER experienced the type of gameplay that I have found here. Nightly I am amazed at the personalities and gaming talent. Zephyr: Apophis is clearly a highly sophisticated self-aware AI construct that runs on a highly modified toaster oven in Wyzcrak's basement.

                    Comment


                    • #11
                      Re: VB.net

                      oooooooooo duh why dint i see that.....thx wyz.....



                      that fixed it...thx again
                      that sounds like a good idea trooper.
                      -Vulcan

                      Comment


                      • #12
                        Re: VB.net

                        i even added a message box that would make it possible to pick what number you wanna start at.....


                        sweet
                        that sounds like a good idea trooper.
                        -Vulcan

                        Comment

                        Connect

                        Collapse

                        TeamSpeak 3 Server

                        Collapse

                        Advertisement

                        Collapse

                        Twitter Feed

                        Collapse

                        Working...
                        X