Friend Class AeroWizardForm

    Private _currentPage As Integer = 0

    Public Sub New()

        MyBase.New()
        InitializeComponent()
        Me.AcceptButton = NextButton
        Me.CancelButton = CancelButton2
        ChangePage(0)

    End Sub

    Private Sub ChangePage(ByVal page As Integer)

        _currentPage = page
        Select Case _currentPage
            Case 0
                BackButton.Enabled = False
                With NextButton
                    .Enabled = True
                    .Text = "&Start"
                End With
                HomePagePanel.Show()
                SecondPagePanel.Hide()
                FinishPanel.Hide()
            Case 1
                BackButton.Enabled = True
                NextButton.Text = "&Next"
                SecondPagePanel.Show()
                HomePagePanel.Hide()
                FinishPanel.Hide()
            Case 2
                With NextButton
                    .Enabled = True
                    .Text = "&Finish"
                End With
                FinishPanel.Show()
                HomePagePanel.Hide()
                SecondPagePanel.Hide()
        End Select

    End Sub

    Private Sub ImportExportWizardForm_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        If IsCompositionEnabled() Then
            BackPanel.BackColor = Color.Black
            MakeWindowGlass(Me.Handle, 0, 0, 40, 0)
        End If

    End Sub

    Private Sub ImportExportWizardForm_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint

        e.Graphics.DrawLine(New Pen(Color.FromArgb(223, 223, 223), 1), 0, 320, Me.Width, 320)
        DrawTextOnGlass(BackPanel.Handle, "Aero Wizard", New Font("Segoe UI", 9), New Rectangle(30, 8, 200, 18), 10)

    End Sub

    Private Sub BackPanel_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles BackPanel.Paint

        'e.Graphics.DrawImage(Insert small wizard icon here, New Rectangle(8, 6, 20, 20))

    End Sub

    Private Sub ChoicePanel_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles HomePagePanel.Paint

        e.Graphics.DrawString("Home Page", New Font("Segoe UI", 12), New SolidBrush(Color.FromArgb(0, 51, 153)), 32, 16)

    End Sub

    Private Sub ProgressPanel_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles SecondPagePanel.Paint

        e.Graphics.DrawString("Second Page", New Font("Segoe UI", 12), New SolidBrush(Color.FromArgb(0, 51, 153)), 32, 16)

    End Sub

    Private Sub FinishPanel_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles FinishPanel.Paint

        e.Graphics.DrawString("Finish", New Font("Segoe UI", 12), New SolidBrush(Color.FromArgb(0, 51, 153)), 32, 16)

    End Sub

    Private Sub BackButton_Click(ByVal sender As Object, ByVal e As EventArgs) Handles BackButton.Click

        Me.Cursor = Cursors.WaitCursor
        ChangePage(_currentPage - 1)
        Me.Cursor = Cursors.Default

    End Sub

    Private Sub NextButton_Click(ByVal sender As Object, ByVal e As EventArgs) Handles NextButton.Click

        Select Case _currentPage
            Case 0
                ChangePage(1)
            Case 1
                ChangePage(2)
            Case 2
                Me.Close()
        End Select

    End Sub

End Class