Imports System.Drawing
Imports System.Windows.Forms

Public Class frmGrayOut

    Private Sub frmGrayOut_KeyDown(sender As Object, e As KeyEventArgs) Handles Me.KeyDown
        If e.KeyCode = Keys.Escape Then
            Me.Close()
        End If
    End Sub

    Private Sub frmGrayOut_Load(sender As Object, e As EventArgs) Handles Me.Load
        Me.Location = New Point(0, 0)
        Me.Size = Screen.PrimaryScreen.WorkingArea.Size
        'Damit Center von Child-Form richtig ist
    End Sub

    Private Sub frmGrayOut_Shown(sender As Object, e As EventArgs) Handles Me.Shown
        Me.MaximumSize = Screen.PrimaryScreen.WorkingArea.Size
        Me.Size = Screen.PrimaryScreen.WorkingArea.Size
        Me.Location = New Point(0, 0)
    End Sub
End Class