Public Class Form2 Inherits Form Public Sub New() Me.Text = "Form2" End Sub Private Sub Form2_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing e.Cancel = True Me.Hide() End Sub End Class