If bolOnClose <> True Then If INIRead(Application.StartupPath & "\Config.ini", "Config", "OnExit", "Unknown") = "Prompt" Then Select Case MessageBox.Show("Are you sure you want to exit?", Application.ProductName, MessageBoxButtons.YesNo, MessageBoxIcon.Question) Case vbNo e.Cancel = True Exit Sub Case vbYes objTray.Visible = False If Me.WindowState = FormWindowState.Minimized Then End If End Select ElseIf INIRead(Application.StartupPath & "\Config.ini", "Config", "OnExit", "Unknown") = "SysTray" Then e.Cancel = True objTray.Visible = True Me.Hide() Exit Sub End If End If