Click here to Skip to main content
15,891,657 members
Articles / Programming Languages / Visual Basic

GN Wizard Framework

Rate me:
Please Sign up or sign in to vote.
4.73/5 (51 votes)
21 Dec 2006CPOL3 min read 176.5K   1.7K   94  
A simple Wizard framework.
<Designer(GetType(ButtonBarDesigner)), DesignTimeVisible(True), Serializable()> _
Friend Class ButtonBar
    Inherits System.Windows.Forms.UserControl

    Public Event NextClicked()
    Public Event PreviousClicked()
    Public Event CancelClicked()
    Public Event FinishClicked()

#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

    'UserControl 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

    '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.
    Friend WithEvents ThreeDLine1 As ItchinWizard.ThreeDLine
    Friend WithEvents btnCancel As System.Windows.Forms.Button
    Friend WithEvents btnFinish As System.Windows.Forms.Button
    Friend WithEvents btnPrevious As System.Windows.Forms.Button
    Friend WithEvents btnNext As System.Windows.Forms.Button
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        Me.ThreeDLine1 = New ItchinWizard.ThreeDLine
        Me.btnCancel = New System.Windows.Forms.Button
        Me.btnFinish = New System.Windows.Forms.Button
        Me.btnPrevious = New System.Windows.Forms.Button
        Me.btnNext = New System.Windows.Forms.Button
        Me.SuspendLayout()
        '
        'ThreeDLine1
        '
        Me.ThreeDLine1.Dock = System.Windows.Forms.DockStyle.Top
        Me.ThreeDLine1.LineStyle = System.Windows.Forms.Border3DStyle.Etched
        Me.ThreeDLine1.Location = New System.Drawing.Point(0, 0)
        Me.ThreeDLine1.Name = "ThreeDLine1"
        Me.ThreeDLine1.Size = New System.Drawing.Size(376, 8)
        Me.ThreeDLine1.Spacing = 0
        Me.ThreeDLine1.TabIndex = 11
        '
        'btnCancel
        '
        Me.btnCancel.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
                    Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
        Me.btnCancel.FlatStyle = System.Windows.Forms.FlatStyle.System
        Me.btnCancel.ImeMode = System.Windows.Forms.ImeMode.On
        Me.btnCancel.Location = New System.Drawing.Point(7, 5)
        Me.btnCancel.Name = "btnCancel"
        Me.btnCancel.Size = New System.Drawing.Size(51, 23)
        Me.btnCancel.TabIndex = 16
        Me.btnCancel.Text = "&Cancel"
        '
        'btnFinish
        '
        Me.btnFinish.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
                    Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
        Me.btnFinish.FlatStyle = System.Windows.Forms.FlatStyle.System
        Me.btnFinish.ImeMode = System.Windows.Forms.ImeMode.On
        Me.btnFinish.Location = New System.Drawing.Point(295, 5)
        Me.btnFinish.Name = "btnFinish"
        Me.btnFinish.TabIndex = 15
        Me.btnFinish.Text = "&Finish"
        '
        'btnPrevious
        '
        Me.btnPrevious.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
                    Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
        Me.btnPrevious.FlatStyle = System.Windows.Forms.FlatStyle.System
        Me.btnPrevious.ImeMode = System.Windows.Forms.ImeMode.On
        Me.btnPrevious.Location = New System.Drawing.Point(135, 5)
        Me.btnPrevious.Name = "btnPrevious"
        Me.btnPrevious.TabIndex = 14
        Me.btnPrevious.Text = "&Previous"
        '
        'btnNext
        '
        Me.btnNext.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
                    Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
        Me.btnNext.FlatStyle = System.Windows.Forms.FlatStyle.System
        Me.btnNext.ImeMode = System.Windows.Forms.ImeMode.On
        Me.btnNext.Location = New System.Drawing.Point(215, 5)
        Me.btnNext.Name = "btnNext"
        Me.btnNext.TabIndex = 13
        Me.btnNext.Text = "&Next"
        '
        'ButtonBar
        '
        Me.Controls.Add(Me.btnCancel)
        Me.Controls.Add(Me.btnFinish)
        Me.Controls.Add(Me.btnPrevious)
        Me.Controls.Add(Me.btnNext)
        Me.Controls.Add(Me.ThreeDLine1)
        Me.Name = "ButtonBar"
        Me.Size = New System.Drawing.Size(376, 32)
        Me.ResumeLayout(False)

    End Sub

#End Region

    Private Sub btnCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancel.Click
        RaiseEvent CancelClicked()
    End Sub

    Private Sub btnPrevious_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPrevious.Click
        RaiseEvent PreviousClicked()
    End Sub

    Private Sub btnNext_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnNext.Click
        RaiseEvent NextClicked()
    End Sub

    Private Sub btnFinish_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnFinish.Click
        RaiseEvent FinishClicked()
    End Sub
End Class

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer
United Kingdom United Kingdom
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions