Results 1 to 10 of 10

Thread: [2005] Creating A Wizard In VB.NET

  1. #1

    Thread Starter
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    [2005] Creating A Wizard In VB.NET

    Attached is a basic example of how to create a Wizard in VB.NET 2005.

    Thanks to Atheist for pointing out the one thing I was not sure how to do and that is work with a collection of controls (formerly known as a control array.)

    I am using five GroupBox controls for the Wizard. I chose those over Panels because I like the caption feature of the GroupBox.

    This program does not actually do anything other than demonstrate how a Wizard should work.

    For those of you that would like to see how this is done, but do not want to download the actual project, I put the salient portions of the code necessary in the second post of this thread.
    Attached Files Attached Files

  2. #2

    Thread Starter
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: [2005] Creating A Wizard In VB.NET

    Wizard code
    Code:
    Public Class Wizard
    
        Public Sub New()
            InitializeComponent()
            WizardFrameCollection = New GroupBox() {Me.GroupBox1, Me.GroupBox2, Me.GroupBox3, Me.GroupBox4, Me.GroupBox5}
        End Sub
    
        Private WizardFrameCollection() As GroupBox
        Private FrameIndex As Integer = 0
    
        Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
                With WizardFrameCollection(0)
                .Size = New Size(533, 223)
                .Location = New Point(161, 1)
            End With        
        End Sub
    
        Private Sub btnNext_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNext.Click
            WizardFrameCollection(FrameIndex).Visible = False
            FrameIndex = FrameIndex + 1
            If FrameIndex = 4 Then btnNext.Enabled = False 'last frame so there is no next
            btnBack.Enabled = True
            With WizardFrameCollection(FrameIndex)
                .Size = New Size(533, 223)
                .Location = New Point(161, 1)
                .Visible = True
            End With
        End Sub
    
        Private Sub btnBack_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnBack.Click
            WizardFrameCollection(FrameIndex).Visible = False
            FrameIndex = FrameIndex - 1
            btnNext.Enabled = True
            With WizardFrameCollection(FrameIndex)
                .Size = New Size(533, 223)
                .Location = New Point(161, 1)
                .Visible = True
            End With
    
            If FrameIndex = 0 Then 'first frame so no where to go back to
                btnBack.Enabled = False
            Else
                btnBack.Enabled = True
            End If
        End Sub
    End Class

  3. #3

    Thread Starter
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: [2005] Creating A Wizard In VB.NET

    Apparently, I forgot to include the solution file in my zip.

    Thank you Loraine!
    Attached Files Attached Files

  4. #4
    Fanatic Member Loraine's Avatar
    Join Date
    Aug 2006
    Location
    8ft. underground
    Posts
    581

    Re: [2005] Creating A Wizard In VB.NET

    I think they know how to run it even there is no solution project at all . Now the problem is after extracting the files and run it the following error showed up.

    One or more projects in the solution could not be loaded for the following reasons;

    1. The project file or web has been moved, renamed or is not on your computer.

    This projects will be labeled as unavailable in solution explorer. Expand the project node to show the reason the project could not be loaded.

  5. #5

    Thread Starter
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: [2005] Creating A Wizard In VB.NET

    Is there something that I forgot to include in the zip file?

    Anyone?

  6. #6
    Fanatic Member Loraine's Avatar
    Join Date
    Aug 2006
    Location
    8ft. underground
    Posts
    581

    Re: [2005] Creating A Wizard In VB.NET

    Excuse me sir Hack but can you attached all the files included in the project such as:

    Bin Folder(Including the files inside)
    Obj Folder(Including the files inside)
    My Project Folder(Including the files inside)

  7. #7

    Thread Starter
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: [2005] Creating A Wizard In VB.NET

    How is this?
    Attached Files Attached Files

  8. #8
    Fanatic Member Loraine's Avatar
    Join Date
    Aug 2006
    Location
    8ft. underground
    Posts
    581

    Re: [2005] Creating A Wizard In VB.NET

    Still not working

  9. #9
    PowerPoster JuggaloBrotha's Avatar
    Join Date
    Sep 2005
    Location
    Lansing, MI; USA
    Posts
    4,286

    Re: [2005] Creating A Wizard In VB.NET

    It works fine for me, although those buttons look kind of weird being white like that :P

    Loraine: Unzip all of the files to a new folder, then double click the 'Wizard.vbproj' and click 'Run' in the IDE when it's loaded
    Currently using VS 2015 Enterprise on Win10 Enterprise x64.

    CodeBank: All ThreadsColors ComboBoxFading & Gradient FormMoveItemListBox/MoveItemListViewMultilineListBoxMenuButtonToolStripCheckBoxStart with Windows

  10. #10
    Hyperactive Member
    Join Date
    Mar 2007
    Location
    Hong Kong
    Posts
    384

    Re: [2005] Creating A Wizard In VB.NET

    Hi Hack,
    what is the wizard exactly doing?
    when I select a month on yr program, the exception show out
    Code:
     'System.ArgumentOutOfRangeException' in mscorlib.dll
    
    other: Year、Month and Day parameter cannot represent DateTime。

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width