Public Class Main
    Inherits System.Windows.Forms.Form

#Region " Windows Form Designer generated code "

    Public Sub New()
        MyBase.New()

        'This call is required by the Windows Form Designer.
        InitializeComponent()

        'Add any initialization after the InitializeComponent() call

    End Sub

    'Form overrides dispose to clean up the component list.
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
        If disposing Then
            If Not (components Is Nothing) Then
                components.Dispose()
            End If
        End If
        MyBase.Dispose(disposing)
    End Sub
    Friend WithEvents cmdTransparent As System.Windows.Forms.Button
    Friend WithEvents cmdHoles As System.Windows.Forms.Button
    Friend WithEvents cmdScrollable As System.Windows.Forms.Button
    Friend WithEvents cmdScrollablePanel As System.Windows.Forms.Button

    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer

    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer.  
    'Do not modify it using the code editor.
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        Me.cmdTransparent = New System.Windows.Forms.Button
        Me.cmdHoles = New System.Windows.Forms.Button
        Me.cmdScrollable = New System.Windows.Forms.Button
        Me.cmdScrollablePanel = New System.Windows.Forms.Button
        Me.SuspendLayout()
        '
        'cmdTransparent
        '
        Me.cmdTransparent.Location = New System.Drawing.Point(20, 20)
        Me.cmdTransparent.Name = "cmdTransparent"
        Me.cmdTransparent.Size = New System.Drawing.Size(108, 53)
        Me.cmdTransparent.TabIndex = 0
        Me.cmdTransparent.Text = "Formularz częściowo przezroczysty"
        '
        'cmdHoles
        '
        Me.cmdHoles.Location = New System.Drawing.Point(20, 95)
        Me.cmdHoles.Name = "cmdHoles"
        Me.cmdHoles.Size = New System.Drawing.Size(108, 57)
        Me.cmdHoles.TabIndex = 1
        Me.cmdHoles.Text = "Dziurawy formularz"
        '
        'cmdScrollable
        '
        Me.cmdScrollable.Location = New System.Drawing.Point(152, 20)
        Me.cmdScrollable.Name = "cmdScrollable"
        Me.cmdScrollable.Size = New System.Drawing.Size(108, 53)
        Me.cmdScrollable.TabIndex = 2
        Me.cmdScrollable.Text = "Formularz przewijany"
        '
        'cmdScrollablePanel
        '
        Me.cmdScrollablePanel.Location = New System.Drawing.Point(152, 95)
        Me.cmdScrollablePanel.Name = "cmdScrollablePanel"
        Me.cmdScrollablePanel.Size = New System.Drawing.Size(108, 57)
        Me.cmdScrollablePanel.TabIndex = 3
        Me.cmdScrollablePanel.Text = "Formularz z przewijalnym panelem"
        '
        'Main
        '
        Me.AutoScaleBaseSize = New System.Drawing.Size(5, 14)
        Me.ClientSize = New System.Drawing.Size(282, 173)
        Me.Controls.Add(Me.cmdScrollablePanel)
        Me.Controls.Add(Me.cmdScrollable)
        Me.Controls.Add(Me.cmdHoles)
        Me.Controls.Add(Me.cmdTransparent)
        Me.Font = New System.Drawing.Font("Tahoma", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
        Me.MaximizeBox = False
        Me.MinimizeBox = False
        Me.Name = "Main"
        Me.Text = "Wybór demonstracji"
        Me.ResumeLayout(False)

    End Sub

#End Region


    Private Sub ShowForm(ByVal sender As System.Object, ByVal e As System.EventArgs) _
      Handles cmdHoles.Click, cmdScrollable.Click, cmdScrollablePanel.Click, cmdTransparent.Click

        Dim frm As Form

        ' Find out who fired this event, and create the
        '  appropriate form.
        ' Sprawdź, który przycisk spowodował zdarzenie i utwórz odpowiedni formularz.
        If sender Is cmdHoles Then
            frm = New Holes()
        ElseIf sender Is cmdScrollable Then
            frm = New Scrollable()
        ElseIf sender Is cmdScrollablePanel Then
            frm = New ScrollablePanel()
        ElseIf sender Is cmdTransparent Then
            frm = New Transparent()
        End If

        ' Show the form.
        ' Pokaż formularz. 
        frm.ShowDialog()

    End Sub
End Class
