Keep opening even though calling form is closed

jdy0803

Well-known member
Joined
Sep 9, 2012
Messages
73
Location
Santa Clarita
Programming Experience
10+
Form1 load Form2 as a modeless like following.

Dim frm As New Form2
frm.Show()

In case Form1 is closed, Form2 is automatically closed.
Can I prevent from closing Form2 even though close Form1?
 
Closing your starting form always closes every other form. Instead, create a third form, set it invisible, and use it as starting form. From there open up Form1, which opens Form2. But now you can close one or the other or both without closing your app (which is really Form3, hidden).

Just make sure your user has a way of knowing your app is opened even if Form1 and Form2 are closed.
 
Back
Top