Public Class frmAlert
    Public buergschaft As String = ""
    Public referenzbetrag As String = ""
    Public aktWert As String = ""
    Public stufe As Integer = -1
    Public kontoNr As String = ""
    Dim BRG As New cBrgDb
    Private Sub frmAlert_Load(sender As Object, e As EventArgs) Handles Me.Load

        '    frmMain.Visible = False
        Me.WindowState = FormWindowState.Normal
        Me.MaximizeBox = False
        Me.MinimizeBox = False
        Me.ControlBox = False
        Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle

        txtBuergschaft.Text &= buergschaft
        lblReferenzbetrag.Text &= referenzbetrag
        lblAktWert.Text &= aktWert
        If stufe = 1 Then
            Label1.Text = "1. Warnung"
            Panel1.BackColor = Color.DarkOrange
        ElseIf stufe = 2 Then
            Label1.Text = "2. Warnung"
            Panel1.BackColor = Color.Red
        ElseIf stufe = 3 Then
            Label1.Text = "ACHTUNG"
            Panel1.BackColor = Color.DarkRed
        End If

    End Sub

    Private Sub frmAlert_Shown(sender As Object, e As EventArgs) Handles Me.Shown
        Me.Top = My.Computer.Screen.WorkingArea.Height - Me.Height
        Me.Left = My.Computer.Screen.WorkingArea.Width - Me.Width
        Me.BringToFront()
        '  frmMain.Hide()
    End Sub

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        BRG.insertupdateMeldung(Now.ToShortDateString, kontoNr, stufe, System.Environment.MachineName & "\" & Environment.UserName)
        Me.Hide()
        frmMain.Show()
    End Sub

    Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
        Me.Hide()
        'frmMain.Hide()
        ' frmMain.Show()

    End Sub
End Class