Microsoft Developer Network > Página principal de foros > Visual Basic General > Console keeps automatically closing whenever I try to debug
Formular una preguntaFormular una pregunta
 

RespondidaConsole keeps automatically closing whenever I try to debug

  • domingo, 08 de noviembre de 2009 2:10Nick93Db Medallas del usuarioMedallas del usuarioMedallas del usuarioMedallas del usuarioMedallas del usuario
     
    I have had this problem in Vista alot, and I don't know why. I am encrypting,decrypting information using this tutorial and code (from MS): http://support.microsoft.com/default.aspx/kb/301070  (scroll all the way to the bottom for the complete code).


    Sometimes it happens for Apps I didn't make. For example, it used to happen when I was trying to run TouchLib/Tbeta/CCV. That has stopped. I always thought it happened because I didnt have the right .NET framework or something, but I have the latest framework. Am I missing something else?

    Does anyone know a fix for this?

    --Nick

Respuestas

  • domingo, 08 de noviembre de 2009 5:48bdbodger Medallas del usuarioMedallas del usuarioMedallas del usuarioMedallas del usuarioMedallas del usuario
     Respondida
    Console applications by design close after executing thier code . Statements can be added like Console.ReadLine that will keep the console window open waiting for the user to type a line into the console and then press enter but even then if it is not in a loop then once it processes the line it will close . The code in the link you provided executes the Sub Main then closes that is exactly what it is suppose to do there is nothing to stop it from doing so .
    coding for fun Be a good forum member mark posts that contain the answers to your questions or those that are helpful
    Please format the code in your posts with the button . Makes it easier to read .

Todas las respuestas

  • domingo, 08 de noviembre de 2009 5:48bdbodger Medallas del usuarioMedallas del usuarioMedallas del usuarioMedallas del usuarioMedallas del usuario
     Respondida
    Console applications by design close after executing thier code . Statements can be added like Console.ReadLine that will keep the console window open waiting for the user to type a line into the console and then press enter but even then if it is not in a loop then once it processes the line it will close . The code in the link you provided executes the Sub Main then closes that is exactly what it is suppose to do there is nothing to stop it from doing so .
    coding for fun Be a good forum member mark posts that contain the answers to your questions or those that are helpful
    Please format the code in your posts with the button . Makes it easier to read .