why the inputform closes

Oct 19, 2016 at 6:54 PM
Edited Oct 19, 2016 at 6:55 PM
reproduce:
1- put a notificacion message with your template into form load
2- put an inputbox or a messagebox into form load
3- wait the animation close the notification
4- the inputbox just closes
Private Sub lifeTimer_Tick(ByVal sender As Object, ByVal e As EventArgs) Handles lifeTimer.Tick
        'The form's lifetime has expired.
         Me.Close()
End Sub
I made a wrapper function to your app
    Public Sub toastmsg(ByVal titulo As String, ByVal texto As String, ByVal prioridad As Integer)
        Dim icono As Image
        Dim color As MetroFramework.MetroColorStyle
        Dim slice As New frmNotificaciones(4000, texto)

        Select Case prioridad
            Case 2
                icono = My.Resources.warn
                color = MetroFramework.MetroColorStyle.Yellow
            Case 3
                icono = My.Resources.err
                color = MetroFramework.MetroColorStyle.Red
            Case Else
                icono = My.Resources.info
                color = MetroFramework.MetroColorStyle.Blue
        End Select

        slice.Style = color
        slice.PictureBox1.Image = icono
        slice.Text = titulo

        slice.Show()

    End Sub
Good job btw
Regards,
Oct 19, 2016 at 8:04 PM
Just made a workaround, but only temporal
    Private Sub lifeTimer_Tick(ByVal sender As Object, ByVal e As EventArgs) Handles lifeTimer.Tick
        'The form's lifetime has expired.
        'cierra otros forms como inputbox o messagebox
        lifeTimer.Stop()
        Me.Hide()
        openForms.Last.Close()
    End Sub