open app from sub main - app quits

A

Abda

Yeah, if I open my app from sub main

Module 1

Sub Main()
Dim frm As New Form1
frm.Show()
End Sub
End Module

my app quits. How do I keep it open?
 
H

Herfried K. Wagner [MVP]

* "Abda said:
Yeah, if I open my app from sub main

Module 1

Sub Main()
Dim frm As New Form1
frm.Show()
End Sub
End Module

my app quits. How do I keep it open?

\\\
Public Sub Main()
Application.Run(New Form1())
End Sub
///
 
G

Gary Milton

Use Application.Run(New Form1) instead which will start a message loop and
prevent the application from terminating while your form is still in memory.

HTH,
Gary
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top