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. C#
  4. delay or producing a gap

delay or producing a gap

Scheduled Pinned Locked Moved C#
helpcsharpc++winformscom
2 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.
  • A Offline
    A Offline
    Asim N
    wrote on last edited by
    #1

    HELLO, here is a little problem that i am facing. in a foreach( ) loop, i want to display a message box or anything, but i want to display that after some gap. i.e. PRODUCING SOME DELAY is there any method like delay() in c/c++? i found timer class for windows forms in c#, but there is some problem with it. it just says invalid com component exception after each display of the message box. i just want to have a gap of 30 seconds. if there is anyother way plz guide me. can someone guide me on this. A piece of code or link. i would really be thankful on this help. LOOKING FOR HELP ASIM. Asim

    D 1 Reply Last reply
    0
    • A Asim N

      HELLO, here is a little problem that i am facing. in a foreach( ) loop, i want to display a message box or anything, but i want to display that after some gap. i.e. PRODUCING SOME DELAY is there any method like delay() in c/c++? i found timer class for windows forms in c#, but there is some problem with it. it just says invalid com component exception after each display of the message box. i just want to have a gap of 30 seconds. if there is anyother way plz guide me. can someone guide me on this. A piece of code or link. i would really be thankful on this help. LOOKING FOR HELP ASIM. Asim

      D Offline
      D Offline
      dazinith
      wrote on last edited by
      #2

      Thread.Sleep(1500);

      will cause a 1.5 second pause before going to the next line of code.. still a newb.. cut me some slack :P -dz

      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