Results 1 to 15 of 15

Thread: Wizard Control

  1. #1

    Thread Starter
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    8,598

    Wizard Control

    Name:  Wizard Control.png
Views: 5457
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: 3604
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: 3939
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: 5417
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: 3723
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 05: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

    Copy/move files using Windows Shell | I'm not wanted

    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

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  2. #2

    Thread Starter
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    8,598

    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 05: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

    Copy/move files using Windows Shell | I'm not wanted

    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

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  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
    5,398

    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
    8,598

    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

    Copy/move files using Windows Shell | I'm not wanted

    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

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  6. #6

    Thread Starter
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    8,598

    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

    Copy/move files using Windows Shell | I'm not wanted

    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

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

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

    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.
    "Code is like humor. When you have to explain it, it is bad." - Cory House
    VbLessons | Code Tags | Sword of Fury - Jameram

  8. #8

    Thread Starter
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    8,598

    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

    Copy/move files using Windows Shell | I'm not wanted

    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

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  9. #9
    New Member
    Join Date
    May 2018
    Posts
    1

    Re: Wizard Control

    Hi Niya

    I'm testing your wizard in my project, it's very nice and useful.
    There is a way to set buttons text? I'd like to change for istance "Next" text in "Successivo" text the value in a variable is "Italian".
    Thanks for your help.

  10. #10

    Thread Starter
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    8,598

    Re: Wizard Control

    Quote Originally Posted by antonfonta View Post
    Hi Niya

    I'm testing your wizard in my project, it's very nice and useful.
    There is a way to set buttons text? I'd like to change for istance "Next" text in "Successivo" text the value in a variable is "Italian".
    Thanks for your help.
    This is a good suggestion. Sorry I wasn't around when you made this post. It's been 7 years since I touched this project. Didn't realize it became a bit popular. I might have to dust off the code and update it.
    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

    Copy/move files using Windows Shell | I'm not wanted

    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

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  11. #11
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Location
    South Louisiana
    Posts
    11,698

    Re: Wizard Control

    Quote Originally Posted by Niya View Post
    Didn't realize it became a bit popular. I might have to dust off the code and update it.
    I literally used it in my last (paid) project. It's a nice little widget.
    "Code is like humor. When you have to explain it, it is bad." - Cory House
    VbLessons | Code Tags | Sword of Fury - Jameram

  12. #12

    Thread Starter
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    8,598

    Re: Wizard Control

    Quote Originally Posted by dday9 View Post
    I literally used it in my last (paid) project. It's a nice little widget.
    Wow. I didn't realize. Did it give you any significant headaches?
    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

    Copy/move files using Windows Shell | I'm not wanted

    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

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  13. #13
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Location
    South Louisiana
    Posts
    11,698

    Re: Wizard Control

    Quote Originally Posted by Niya View Post
    Wow. I didn't realize. Did it give you any significant headaches?
    None at all. I used the wizard control to setup the application settings on the application's first time loading and reused it so that they can change the settings afterwards via a button click.

    My settings had basically three different "categories" so I had one set of settings in their own panel and then used the last panel as a confirmation page.

    Everything worked out exactly as I expected it to.
    "Code is like humor. When you have to explain it, it is bad." - Cory House
    VbLessons | Code Tags | Sword of Fury - Jameram

  14. #14

    Thread Starter
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    8,598

    Re: Wizard Control

    Glad you found it useful. xD
    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

    Copy/move files using Windows Shell | I'm not wanted

    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

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  15. #15
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    25,458

    Re: Wizard Control

    @Niya… Like it. I wrote something similar, but that’s not online these days since the MSDN changes

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
  •  



Click Here to Expand Forum to Full Width