Le réseau pour les développeurs > Forums - Accueil > Visual Basic General > Console keeps automatically closing whenever I try to debug
Poser une questionPoser une question
 

TraitéeConsole keeps automatically closing whenever I try to debug

  • dimanche 8 novembre 2009 02:10Nick93Db Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     
    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

Réponses

  • dimanche 8 novembre 2009 05:48bdbodger Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     Traitée
    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 .

Toutes les réponses

  • dimanche 8 novembre 2009 05:48bdbodger Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     Traitée
    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 .