Results 1 to 3 of 3

Thread: Prevent the console from closing

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2004
    Location
    North East England, UK
    Posts
    9

    Prevent the console from closing

    When i build a Console application and run it the console always closes after the program is executed which means I cannot view any output. How do I stop the console from closing?

    Thanks

  2. #2
    Fanatic Member pvbangera's Avatar
    Join Date
    Sep 2001
    Location
    Mumbai, India
    Posts
    961
    Which is ur startup object? and wot's the command u use to display it?

    i guess it would be frmStartupObject.Show()

    try using frmStartupObject.ShowDialog

    or

    Application.Run("frmStartupObject")

    hope it helps

  3. #3
    G&G Moderator chemicalNova's Avatar
    Join Date
    Jun 2002
    Location
    Victoria, Australia
    Posts
    4,246
    It exits because it doesn't have anything left to perform. You need to make it want input:

    VB Code:
    1. Console.GetLine()

    Then it will stop and wait for the user to press enter.

    Phreak

    Visual Studio 6, Visual Studio.NET 2005, MASM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width