none
Visual Basic: Sub Main() closes after code is finished [Application Framework deactivated: Code in Modul] RRS feed

  • Allgemeine Diskussion

  • Hello everybody,

    Today I tried making a program without the Application Framework enabled. I wrote the Code in Sub Main() in Modul Main.

    So the Code looks like:

    Dim Withevents tmr As New Forms.Timer
    Sub Main()
    tmr.interval = 1000
    tmr.start()
    End Sub

    So the program closes now, but the Timer is runing, which does the main thing.

    How can I prevent the program from closing and let the Timer do its work?

    Thanks in advance !

    • Typ geändert Ionut DumaModerator Freitag, 30. August 2013 12:58 Keine Rueckmeldung des Fragenstellender
    Samstag, 24. August 2013 17:02

Alle Antworten