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. timer for 5 seconds.

timer for 5 seconds.

Scheduled Pinned Locked Moved C#
question
3 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.
  • T Offline
    T Offline
    tingu
    wrote on last edited by
    #1

    Can somebody send me timer code for 5 seconds? I need to put it so that form can wait to be closed for 5 seconds. I need to show the form for 5 seconds before closing. Here is the code: private void Form1_Load(object sender, EventArgs e) { this.Show(); int ret1 = 0; int ret2 = 0; ret1 = ConfigureSSE1(); ret2 = CreateLogin(); // Add code here to wait for 5 seconds to display the form which has Label, "Configuring..." this.Close(); }

    L N 2 Replies Last reply
    0
    • T tingu

      Can somebody send me timer code for 5 seconds? I need to put it so that form can wait to be closed for 5 seconds. I need to show the form for 5 seconds before closing. Here is the code: private void Form1_Load(object sender, EventArgs e) { this.Show(); int ret1 = 0; int ret2 = 0; ret1 = ConfigureSSE1(); ret2 = CreateLogin(); // Add code here to wait for 5 seconds to display the form which has Label, "Configuring..." this.Close(); }

      L Offline
      L Offline
      led mike
      wrote on last edited by
      #2

      By now you should have been able to read the Timer documentation[^] and have this working, so have you?

      led mike

      1 Reply Last reply
      0
      • T tingu

        Can somebody send me timer code for 5 seconds? I need to put it so that form can wait to be closed for 5 seconds. I need to show the form for 5 seconds before closing. Here is the code: private void Form1_Load(object sender, EventArgs e) { this.Show(); int ret1 = 0; int ret2 = 0; ret1 = ConfigureSSE1(); ret2 = CreateLogin(); // Add code here to wait for 5 seconds to display the form which has Label, "Configuring..." this.Close(); }

        N Offline
        N Offline
        Not Active
        wrote on last edited by
        #3

        IMO this is a fairly useless form if all it does is call two methods then closes after five seconds. You don't need the this.Show(), the form will automatically show (unless you've done something very bizarre) There is a timer control available, plus other very easily discovered methods to have a thread wait. Try searching, then ask if you are stuck.


        only two letters away from being an asset

        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