Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Rtb and timer.

Rtb and timer.

Scheduled Pinned Locked Moved Visual Basic
question
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Subjugate
    wrote on last edited by
    #1

    I would like to ask if anyone knows wat is the maximum number of character a RTB can have? And wat is the maximum interval a timer can have??

    D 1 Reply Last reply
    0
    • S Subjugate

      I would like to ask if anyone knows wat is the maximum number of character a RTB can have? And wat is the maximum interval a timer can have??

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      Subjugate wrote:

      wat is the maximum number of character a RTB can have?

      Up to available memory.

      Subjugate wrote:

      And wat is the maximum interval a timer can have??

      The depends on which Timer you're talking about. If it's the Timer in the Toolbox, then it's Int32.Max, or about 2.14 billion. If it's the Timer in the Threading namespace, then it's Int64.Max, or about 9.2 Million Trillion milliseconds. In either case, if you need to set an interval that high, you really need to rethink your design.

      A guide to posting questions on CodeProject[^]
      Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
           2006, 2007, 2008

      P S 2 Replies Last reply
      0
      • D Dave Kreskowiak

        Subjugate wrote:

        wat is the maximum number of character a RTB can have?

        Up to available memory.

        Subjugate wrote:

        And wat is the maximum interval a timer can have??

        The depends on which Timer you're talking about. If it's the Timer in the Toolbox, then it's Int32.Max, or about 2.14 billion. If it's the Timer in the Threading namespace, then it's Int64.Max, or about 9.2 Million Trillion milliseconds. In either case, if you need to set an interval that high, you really need to rethink your design.

        A guide to posting questions on CodeProject[^]
        Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
             2006, 2007, 2008

        P Offline
        P Offline
        Paul Conrad
        wrote on last edited by
        #3

        Dave Kreskowiak wrote:

        In either case, if you need to set an interval that high, you really need to rethink your design.

        I agree. Though it is nice to know what the limit is, the upper bound really doesn't have any practical purpose. I can't even begin to think of anything that would need that long of a duration between ticks. Especially the 9.2 million trillion milliseconds, that is quite a few years ( ~291 million ) :laugh:

        "The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon "Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham

        1 Reply Last reply
        0
        • D Dave Kreskowiak

          Subjugate wrote:

          wat is the maximum number of character a RTB can have?

          Up to available memory.

          Subjugate wrote:

          And wat is the maximum interval a timer can have??

          The depends on which Timer you're talking about. If it's the Timer in the Toolbox, then it's Int32.Max, or about 2.14 billion. If it's the Timer in the Threading namespace, then it's Int64.Max, or about 9.2 Million Trillion milliseconds. In either case, if you need to set an interval that high, you really need to rethink your design.

          A guide to posting questions on CodeProject[^]
          Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
               2006, 2007, 2008

          S Offline
          S Offline
          Subjugate
          wrote on last edited by
          #4

          Thanks for the ans. I wanted to know is becos my application is a 24/7 running application. i am afraid if my RTB just full and i am not aware, it might crash the application.

          D 1 Reply Last reply
          0
          • S Subjugate

            Thanks for the ans. I wanted to know is becos my application is a 24/7 running application. i am afraid if my RTB just full and i am not aware, it might crash the application.

            D Offline
            D Offline
            Dave Kreskowiak
            wrote on last edited by
            #5

            You don't need a Timer to go for that long. You just set it to fire once a second, then, once per minute, you can compare the current time to a "scheduled" time for a process to kick off. It's utterly pointless to have a timer going for any entire day. What if your app DOES crash, or the machine goes down or loses power?? How are you going to reset the timer to a proper schedule?? That's why you have it check against a known time, instead of a known interval. As for the size of the RTB, you really need to make sure you save off the log information to a file instead of relying on the RTB to hold onto it for you, for the very same reasons I just mentioned above. Cna you think of anything worse than losing half a days data because you didn't save each piece to a file when you received it?

            A guide to posting questions on CodeProject[^]
            Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                 2006, 2007, 2008

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups