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. Alternative to Timer object

Alternative to Timer object

Scheduled Pinned Locked Moved Visual Basic
c++
3 Posts 2 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.
  • R Offline
    R Offline
    Ruca
    wrote on last edited by
    #1

    Hi! I'm quite new at VB, but i've been using VC++ for a while! I would like to know if there is some function (like sleep in c), that can be used to stop application for a determined time. I'm aware of timers and little functions (Ex. for loops..., but we don't actually have much control on the time they take...). Thank you for your time Rui

    Richard DeemingR 1 Reply Last reply
    0
    • R Ruca

      Hi! I'm quite new at VB, but i've been using VC++ for a while! I would like to know if there is some function (like sleep in c), that can be used to stop application for a determined time. I'm aware of timers and little functions (Ex. for loops..., but we don't actually have much control on the time they take...). Thank you for your time Rui

      Richard DeemingR Offline
      Richard DeemingR Offline
      Richard Deeming
      wrote on last edited by
      #2

      In VB.NET, you can use System.Threading.Thread.Sleep(_milliseconds_). In VB6, you would need to import the API function:

      Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)


      "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

      "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

      R 1 Reply Last reply
      0
      • Richard DeemingR Richard Deeming

        In VB.NET, you can use System.Threading.Thread.Sleep(_milliseconds_). In VB6, you would need to import the API function:

        Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)


        "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

        R Offline
        R Offline
        Ruca
        wrote on last edited by
        #3

        Thank you very much Richard, its working! Rui

        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