Results 1 to 5 of 5

Thread: Making a shutdown timer in Visual Studio 2008

  1. #1
    Join Date
    Jul 2006
    Posts
    218

    Making a shutdown timer in Visual Studio 2008

    I thought that this is the place to post my query.! I am trying to make the shutdown timer for practice. I am trying a lot of things but not getting the desired results. I have the GUI there and everything i just dont know how to put it together. I am using the Visual Studio 2008. So do I need to use the Combo Box to delay the shutdown.exe.?? Does any one know how to make a Shut Down timer in Visual Studio 2008.?? Please help me to sort out this problem.
    ~*~Silent~Kid~*~
    "To The World You May Be Just One Person, But To One Person You May Be The World"

  2. #2
    Join Date
    Apr 2008
    Posts
    1,948

    Re: Making a shutdown timer in Visual Studio 2008

    I am not having much knowledge about the Visual Studio. But I know the coding of the shutdown timer in Visual Basic. The VB has a function called Shell(). If you want to shut down in 90 seconds, then you can use the following code :
    Code:
    Shell("shutdown /s /t 90")
    After using this command the shutdown will occur after 90 seconds. 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. If you want to see more about the shutdown, you can use 'shutdown /?'.

  3. #3
    Join Date
    Jan 2008
    Posts
    1,521

    Re: Making a shutdown timer in Visual Studio 2008

    I know that code of shutdown timer in VB .Net. The code in the VB.Net would be like below :
    Code:
    System.Threading.Thread.Sleep(milliseconds)
    Where milliseconds is an integer that tell the program how many milliseconds to wait before it continues. Also you can declare in the following way :
    Code:
    Public Shared Sub Sleep ( _
        millisecondsTimeout As Integer _
    )
    And this code for the usage in Visual Basic
    Code:
    Dim millisecondsTimeout As Integer
    Thread.Sleep(millisecondsTimeout)

  4. #4
    Join Date
    May 2008
    Posts
    2,389

    Re: Making a shutdown timer in Visual Studio 2008

    It's very bad to tell that even I don't know the code for making a shutdown timer in Visual Studio. I know the coding in C# , Visual C++ and JavaScript. Maybe this will help someone :
    In C#, you can use the following :
    Code:
    public static void Sleep(
        int millisecondsTimeout
    )
    For the Visual C++
    Code:
    public:
    static void Sleep(
        int millisecondsTimeout
    )
    And if you are using the JScript
    Code:
    public static function Sleep(
        millisecondsTimeout : int
    )
    Feeling bad for not providing the exact codes needed, but this can help someone else.

  5. #5
    Join Date
    Apr 2008
    Posts
    2,005

    Re: Making a shutdown timer in Visual Studio 2008

    I think that you should try the same coding on the Visual Basic. When compared to Visual Basic, the Visual Studio is not that friendly. So i would like to suggest you to go for the Visual Basic 6.0 if possible. In VB you can use the function called Shell() for making a shut down timer as mentioned by the 'Praetor'. That will certainly help you in the Visual Basic.

Similar Threads

  1. Replies: 2
    Last Post: 16-02-2011, 02:49 PM
  2. Visual Studio 2008 Is forthcoming
    By venkat=raghavan in forum Software Development
    Replies: 6
    Last Post: 25-11-2010, 06:37 AM
  3. Difference between Visual studio 2005 and Visual studio 2008
    By RohanS in forum Software Development
    Replies: 3
    Last Post: 12-06-2009, 10:48 AM
  4. Visual Studio 2008 - Creating DLL
    By Hemal Das in forum Software Development
    Replies: 3
    Last Post: 26-03-2009, 02:36 PM
  5. What is Visual Studio 2008
    By Jackie in forum Software Development
    Replies: 1
    Last Post: 23-12-2008, 05:31 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,750,481,293.76860 seconds with 16 queries