Wizard Control-VBForums
Results 1 to 8 of 8

Thread: Wizard Control

  1. #1

    Thread Starter
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    5,369

    Wizard Control

    Name:  Wizard Control.png
Views: 1341
Size:  25.3 KB

    The above shows a wizard created using a control I developed that can allow developers to implement wizards in their programs with very minimal coding. After referencing the assembly in your Windows Forms project, you may drag the control onto a Form and configure the wizard as you would any other control. I have attached a demo solution that shows what can be done with it. However, the control has very intuitive design time behavior which I will lay out in this post.

    Design-Time

    After spreading the control on a Form it should look like this:-
    Name:  WizDesignTimeNew.png
Views: 1289
Size:  6.2 KB

    The control is very similar to a TabControl. In a TabControl you have to add tab pages to it. With the WizardControl, you have to add WizardPanels to it. You may quickly add panels to it via the control's smart tag.
    Name:  WizSmartTag.png
Views: 1271
Size:  13.0 KB

    The smart tag allows you to quickly add panels to the WizardControl at design time. You may also add panels through the the control's WizardPanels property:-
    Name:  WizPanel Collection Prop.png
Views: 1270
Size:  69.9 KB

    Using that property to manipulate the wizard's panels also gives you finer control in configuring the panels. You may add, remove, or re-order the panels from the collection editor. You may also adjust its properties as well.

    The WizardControl's panels can be selected in the designer as well. You should note that both the WizardControl and its panels are separately selectable at design time. You may select the current panel by clicking on its surface at design time. From here you can change its properties via the property grid as you would any other control.

    If you want to select the WizardControl itself in design mode while it has panels you must click on the navigation bar:-
    Name:  Wiz Select In designer.png
Views: 1273
Size:  6.9 KB

    You may select the WizardControl while it has an active panel by clicking anywhere within the red boxes outlined in the image above.

    Notice that we avoid the "Next" and "Previous" buttons. That's because those buttons are clickable in design mode. They allow you to easily navigate between panels at design time so you can add, remove and configure controls dragged to their surface:-


    Just like a TabControl, you drag and drop controls to the wizard's panels' surfaces.

    Final Notes

    Look to the next post for the attachment of the demo solution. In that solution a few things are demonstrated about using the control. The code in the solution is also commented to help explain how things are done. Suggestions, bug reports and other comments are welcomed.

    Enjoy . See next post for demo.
    Last edited by Niya; Mar 2nd, 2013 at 04:03 PM.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena


    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. -jmcilhinney

  2. #2

    Thread Starter
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    5,369

    Re: Wizard Control

    Here is the demo solution. Please note that its a VS 2010 solution.
    Attached Files Attached Files
    Last edited by Niya; Mar 2nd, 2013 at 04:01 PM.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena


    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. -jmcilhinney

  3. #3
    New Member
    Join Date
    Jun 2014
    Posts
    1

    Re: Wizard Control

    Hi Niya,
    I like this Wizard control so I downloaded it and was trying to modify it for my needs. The only thing I am having an issue with is how can I move the navbar to the top instead of the bottom? Any help would be greatly appreciated.

  4. #4
    Bad man! ident's Avatar
    Join Date
    Mar 2009
    Location
    Cambridge
    Posts
    4,948

    Re: Wizard Control

    Not gone through all the code. Works in 8.1 VS2013 accept skips panel 3??? Is there a reason you invoke twice??? generally interstested.
    vb Code:
    1. LblWaitMsg.Invoke(Sub() LblWaitMsg.Text = "Completed. You may proceed")
    2.  
    3.         'The task is finished so re-enable navigation
    4.         LblWaitMsg.Invoke(Sub()
    5.                               WizardControl1.AllowNext = True
    6.                               WizardControl1.AllowPrevious = True
    7.                           End Sub)

    ah edit. It's meant to. sorry regarding panel 3

  5. #5

    Thread Starter
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    5,369

    Re: Wizard Control

    Quote Originally Posted by ident View Post
    Is there a reason you invoke twice??? generally interstested.
    vb Code:
    1. LblWaitMsg.Invoke(Sub() LblWaitMsg.Text = "Completed. You may proceed")
    2.  
    3.         'The task is finished so re-enable navigation
    4.         LblWaitMsg.Invoke(Sub()
    5.                               WizardControl1.AllowNext = True
    6.                               WizardControl1.AllowPrevious = True
    7.                           End Sub)

    ah edit. It's meant to. sorry regarding panel 3
    Oh. I did that for the specific reason of not confusing developers going through this code. Changing the text of the label has nothing to do with re-enabling navigation so I separated them but in practice, you should do it with a single Invoke call.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena


    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. -jmcilhinney

  6. #6

    Thread Starter
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    5,369

    Re: Wizard Control

    Quote Originally Posted by pwm001 View Post
    Hi Niya,
    I like this Wizard control so I downloaded it and was trying to modify it for my needs. The only thing I am having an issue with is how can I move the navbar to the top instead of the bottom? Any help would be greatly appreciated.
    Missed this post. If you're still around, let me know.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena


    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. -jmcilhinney

  7. #7
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Location
    South Louisiana
    Posts
    9,156

    Re: Wizard Control

    Niya, I just had a need for a wizard control and I remembered that you made one. I really like how you've incorporated the use of smart-tags and how I'm able to navigate in the designer to setup the various panels.

    I have a few things that I wanted to point out though. When I added the files to my project, I needed to reference the following namespaces:
    • System.Design
    • System.ServiceProcess


    I think that it is worth mentioning in your post.

    Also, your code is not completely compatible with Option Strict on. In the WizardControlDesign.vb file, there were a few instances where ISelectionService and IComponentChangeService were not being cast.

    Other than those extremely minor and nit picky things I love the control! As far as improvements, I'd like to see you add a 'help' button in the navigation bar.

  8. #8

    Thread Starter
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    5,369

    Re: Wizard Control

    Quote Originally Posted by dday9 View Post
    Niya, I just had a need for a wizard control and I remembered that you made one. I really like how you've incorporated the use of smart-tags and how I'm able to navigate in the designer to setup the various panels.

    I have a few things that I wanted to point out though. When I added the files to my project, I needed to reference the following namespaces:
    • System.Design
    • System.ServiceProcess


    I think that it is worth mentioning in your post.

    Also, your code is not completely compatible with Option Strict on. In the WizardControlDesign.vb file, there were a few instances where ISelectionService and IComponentChangeService were not being cast.

    Other than those extremely minor and nit picky things I love the control! As far as improvements, I'd like to see you add a 'help' button in the navigation bar.
    Don't know how I missed this post .

    Anyways, I'll look into the things you mentioned when I get some spare time. Been a while since I played around with Control authoring so I'll have to re-familiarize myself with this project before making further changes.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena


    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. -jmcilhinney

Tags for this Thread

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.