Making a shutdown timer. need help with the timer part

Discussion in 'Programming General' started by mike_ftl, Feb 21, 2009.

Making a shutdown timer. need help with the timer part
  1. Unread #1 - Feb 21, 2009 at 7:15 PM
  2. mike_ftl
    Joined:
    Oct 19, 2008
    Posts:
    85
    Referrals:
    1
    Sythe Gold:
    5

    mike_ftl Member

    Making a shutdown timer. need help with the timer part

    i am making a shutdown timer for practice (and i need one that actually works how i need it to)
    basically i got it to shutdown on demand, but i cant delay it. I have the GUI there and everything i just dont know how to put it together.
    So what i need is a way to delay shutdown.exe using a combo box or somethig.

    Ps i am using visual studio 2008.
    Thanks.
    (please help im tryin to get most of it done before school starts again)
     
  3. Unread #2 - Feb 23, 2009 at 4:41 PM
  4. SwiftSeller
    Joined:
    Jun 21, 2008
    Posts:
    2,461
    Referrals:
    0
    Sythe Gold:
    0

    SwiftSeller Grand Master
    Banned

    Making a shutdown timer. need help with the timer part

    Only shutdown timer I know of is to go thru.

    Open command prompt via RUN and typing "CMD"

    In CMD, type "shutdown/i" the menu will appear and you can set a timed delay for shutdown.

    Other than that I have no idea.
     
  5. Unread #3 - Feb 25, 2009 at 6:37 PM
  6. mike_ftl
    Joined:
    Oct 19, 2008
    Posts:
    85
    Referrals:
    1
    Sythe Gold:
    5

    mike_ftl Member

    Making a shutdown timer. need help with the timer part

    i think if i did that then the program would have to make a new timer file everytime i pressed start timer?

    i dont know. Thanks for you help though
     
  7. Unread #4 - Feb 25, 2009 at 7:34 PM
  8. cp
    Joined:
    Jan 30, 2007
    Posts:
    3,278
    Referrals:
    6
    Sythe Gold:
    0

    cp an cat
    Banned

    Making a shutdown timer. need help with the timer part

    Shutdown /i is for silly people. Real men use the command line arguments.

    VB has a function called Shell().

    To shutdown in 60 seconds, you would do this:
    Code:
    Shell("shutdown /s /t 60")
    The string passed to Shell() is the command that is going to run, as if you would have ran it directly from the command line or used a batch file.

    To see what else you can do with shutdown, it would be wise to look at the docs. (shutdown /?)
     
  9. Unread #5 - Feb 26, 2009 at 12:50 AM
  10. mike_ftl
    Joined:
    Oct 19, 2008
    Posts:
    85
    Referrals:
    1
    Sythe Gold:
    5

    mike_ftl Member

    Making a shutdown timer. need help with the timer part

    Sounds good.
    Only problem is i dont know how to use the dropbars and stuff.
     
  11. Unread #6 - Feb 26, 2009 at 11:42 PM
  12. cp
    Joined:
    Jan 30, 2007
    Posts:
    3,278
    Referrals:
    6
    Sythe Gold:
    0

    cp an cat
    Banned

    Making a shutdown timer. need help with the timer part

    Drop bars?

    There is an entire tool box of controls... not to mention, they are drag and drop. Surely you can figure that out? :)
     
< java hwk help lol | Help W/ Buttons >

Users viewing this thread
1 guest


 
 
Adblock breaks this site